Commit e2fcb163 authored by liwei's avatar liwei

增加了会员的查看更多列表

parent eb10c636
......@@ -58,6 +58,21 @@
}
],
"subPackages": [
{
"root": "pagesUser",
"pages": [
{
"path": "userList",
"style": {
"navigationBarTitleText": "会员信息",
"backgroundColor": "#F4F5F9",
"backgroundColorTop": "#F4F5F9",
"navigationBarBackgroundColor": "#F4F5F9",
"navigationStyle": "custom"
}
}
]
},
{
"root": "pagesActivity",
"pages": [
......
<template>
<!-- 使用z-paging-swiper为根节点可以免计算高度 -->
<z-paging-swiper>
<view :class="['add',isOpen?'add2':'']">
<view :class="['add',isOpen ? 'add2':'']">
<image @click='goPage("/pagescommunity/newsRelease/newsRelease")' src="../../static/images/102.png" mode=""/>
</view>
<!-- 需要固定在顶部不滚动的view放在slot="top"的view中 -->
......@@ -53,7 +53,6 @@
import login from '../../components/login/login.vue';
import ELM from '@/components/elm-toast/index.vue';
export default {
// 复制下面这行 options 代码
options: {
styleIsolation: 'shared'
},
......@@ -71,9 +70,6 @@
{
name: '最近',
},
// {
// name: '同城',
// },
],
params: {
pageIndex: 1,
......@@ -93,8 +89,8 @@
};
},
onLoad() {
if (uni.getStorageSync('info') != '') {
this.userInfo = uni.getStorageSync('info');
if (uni.getStorageSync('userInfo') != '') {
this.userInfo = uni.getStorageSync('userInfo');
} else {
this.userInfo = {
id: 0
......@@ -179,7 +175,6 @@
console.log("进来了")
let obj = {
...value,
}
let url = ''
if (obj.isLike) {
......@@ -228,12 +223,6 @@
this.params.tabType = "RECOMMEND"
this.current = 1
}
// else {
// this.params.tabType = "CITY"
// this.current = 2
// }
// this.params.pageIndex = 1
// this.getList(true)
},
goPage(path) {
if (uni.getStorageSync('userInfo') != '') {
......
......@@ -25,7 +25,7 @@
<view class="leftline"></view>
<view class="title">{{notice.title}}</view>
<view class="rightline"></view>
<view class="notice-more" @click="gotopage('/pagesNotice/components/list')">更多</view>
<view class="notice-more" @click="gotoMoreNoticeList">更多</view>
</view>
<!-- 热门推荐-->
<view class="recommendation-top">
......@@ -36,14 +36,14 @@
</view>
</view>
<view class="more">
<view class="more-title" @click="gotoBussinessList">查看更多</view>
<view class="more-title" @click="gotoMoreUserList">查看更多</view>
<view class="more-image">
<image class="rightimage" src="../static/images/home/home_icon_jiantou@2x.png"/>
</view>
</view>
</view>
<view style="border-radius: 12rpx 12rpx 12rpx 12rpx;margin: 34rpx 34rpx 0 34rpx">
<view class="card" v-for="(item,index) in businessList" :key="index" @click="gotodetail(item)">
<view class="card" v-for="(item,index) in businessList" :key="index" @click="gotoUserDetail(item)">
<view class="contentBody">
<view class="leftlist">
<image src="/static/images/home/gonggao.png" class="leftlistimage"/>
......@@ -191,25 +191,28 @@
console.log(e)
})
},
// 页面跳转
gotopage(url) {
uni.reLaunch({
url: url
//查看更多公告
gotoMoreNoticeList() {
uni.navigateTo({
url: '/pagesNotice/components/list'
});
},
//热门推荐 跳转
gotodetail(item){
//查看更多会员用户
gotoMoreUserList(){
uni.navigateTo({
url: '/pages2/business/business/id='+item.businessId
})
url: '/pagesUser/userList'
});
},
goTips() {
//查看会员详情
gotoUserDetail(item){
uni.navigateTo({
url: '/pages2/explain/explain'
});
url: '/pages2/business/business/id='+item.businessId
})
},
//左上角的搜索
async screen() {
const res = await this.$getId();
//判断当前是否已登录
// const res = await this.$getId();
console.log(res);
if (res == 11003) {
this.isLoginPop = true;
......
<template>
<view style="background-color: #F4F5F9;min-height: 100vh;">
<!-- 页头-->
<u-navbar @leftClick="backbar" bgColor="#F4F5F9" title="会员信息"></u-navbar>
<view class="recommendation" :style="{'top':navHeight+'px'}">
<view v-if="isdata" class="nodatacard">
<view class="text">暂无数据</view>
</view>
<view class="card">
<view class="recommendation-card" v-for="item in userList" @click="gotoBusinessDetail(item)">
<view class="card-image">
<image class="img" src="https://cdn.uviewui.com/uview/album/1.jpg"/>
</view>
<view class="card-bottom">
<view class="bottom-left">
<view class="bottom-info">
{{item.nickName}}
<image v-if="item.gender == 'MALE'" class="gender" src="../../static/images/like/male.png" mode=""/>
<image v-else class="gender" src="../../static/images/like/famale.png" mode=""/>
</view>
<view class="bottom-info">
{{item.age}}
<text style="margin-left: 10rpx;margin-right: 10rpx;color: #BBB9B9FF;">|</text>
{{item.height}}cm
</view>
<view class="bottom-address">{{item.address}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
let util = require('@/util/means.js');
export default {
data() {
return {
//用户列表
userList:[
{
nickName:'暖洋洋',
gender:'FEMALE',
age:'21',
height:'165',
address:'重庆市'
},
{
nickName:'暖洋洋',
gender:'MALE',
age:'21',
height:'165',
address:'重庆市'
},
{
nickName:'暖洋洋',
gender:'MALE',
age:'21',
height:'165',
address:'重庆市'
},
{
nickName:'暖洋洋',
gender:'FEMALE',
age:'21',
height:'165',
address:'重庆市'
},
{
nickName:'暖洋洋',
gender:'FEMALE',
age:'21',
height:'165',
address:'重庆市'
},
{
nickName:'暖洋洋',
gender:'FEMALE',
age:'21',
height:'165',
address:'重庆市'
},
],
//是否有数据
isdata: false,
//页面显示的数据类型 1我喜欢的 2喜欢我的 3互相喜欢
type:'',
//页面数据的数量
num:'',
//距离表头
navHeight:'',
share: false,
menuButtonInfo: '',
};
},
onLoad(options) {
//获取当前页面的页头高度
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
const {
top,
width,
height,
right
} = this.menuButtonInfo
uni.getSystemInfo({
success: (res) => {
const {
statusBarHeight
} = res;
const margin = top - statusBarHeight
this.navHeight = (height + statusBarHeight + (margin * 3)) //导航栏总高
}
})
this.getUserList()
},
methods: {
getUserList(){
if (this.type == '1'){
//我喜欢的
const list = [
{
nickName:'暖洋洋',
gender:'FEMALE',
age:'21',
height:'165',
address:'重庆市'
},
{
nickName:'暖洋洋',
gender:'MALE',
age:'21',
height:'165',
address:'重庆市'
},
{
nickName:'暖洋洋',
gender:'MALE',
age:'21',
height:'165',
address:'重庆市'
},
{
nickName:'暖洋洋',
gender:'FEMALE',
age:'21',
height:'165',
address:'重庆市'
},
{
nickName:'暖洋洋',
gender:'FEMALE',
age:'21',
height:'165',
address:'重庆市'
},
{
nickName:'暖洋洋',
gender:'FEMALE',
age:'21',
height:'165',
address:'重庆市'
},
]
this.userList = list
} else if(this.type == '2') {
//喜欢我的
const list = [
{
nickName:'暖洋洋',
gender:'FEMALE',
age:'21',
height:'165',
address:'重庆市'
},
{
nickName:'暖洋洋',
gender:'MALE',
age:'21',
height:'165',
address:'重庆市'
},
{
nickName:'暖洋洋',
gender:'MALE',
age:'21',
height:'165',
address:'重庆市'
},
{
nickName:'暖洋洋',
gender:'FEMALE',
age:'21',
height:'165',
address:'重庆市'
},
{
nickName:'暖洋洋',
gender:'FEMALE',
age:'21',
height:'165',
address:'重庆市'
},
{
nickName:'暖洋洋',
gender:'FEMALE',
age:'21',
height:'165',
address:'重庆市'
},
{
nickName:'暖洋洋',
gender:'FEMALE',
age:'21',
height:'165',
address:'重庆市'
},
]
this.userList = list
} else if(this.type == '3') {
//互相喜欢的
const list = [
{
nickName:'暖洋洋',
gender:'MALE',
age:'21',
height:'165',
address:'重庆市'
},
{
nickName:'暖洋洋',
gender:'MALE',
age:'21',
height:'165',
address:'重庆市'
},
{
nickName:'暖洋洋',
gender:'FEMALE',
age:'21',
height:'165',
address:'重庆市'
},
{
nickName:'暖洋洋',
gender:'FEMALE',
age:'21',
height:'165',
address:'重庆市'
},
{
nickName:'暖洋洋',
gender:'FEMALE',
age:'21',
height:'165',
address:'重庆市'
},
{
nickName:'暖洋洋',
gender:'FEMALE',
age:'21',
height:'165',
address:'重庆市'
},
{
nickName:'暖洋洋',
gender:'FEMALE',
age:'21',
height:'165',
address:'重庆市'
},
{
nickName:'暖洋洋',
gender:'FEMALE',
age:'21',
height:'165',
address:'重庆市'
}
]
this.userList = list
}
},
backbar() {
uni.navigateBack({
delta: 1, //返回层数,2则上上页
})
}
}
};
</script>
<style lang="scss" scoped>
.recommendation {
background-color: #F4F5F9;
position: relative;
padding: 0 34rpx;
.nodatacard{
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
.text{
text-align: center;
padding: 42rpx 0;
font-size: 13px;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #B9B9B9;
}
}
.recommendation-top {
display: flex;
justify-content: space-between;
margin: 56rpx 0;
.top-title {
font-size: 19px;
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
font-weight: bold;
color: #222222;
}
.more {
display: flex;
.more-title {
font-size: 17px;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #848484;
margin-right: 14rpx;
}
.more-image {
display: flex;
align-items: center;
.rightimage {
width: 7px;
height: 12px;
}
}
}
}
.card {
display: grid;
grid-template-columns: 330rpx 330rpx;
grid-column-gap: 22rpx;
.recommendation-card {
width: 330rpx;
margin-bottom: 25rpx;
border-radius: 20rpx 20rpx 20rpx 20rpx;
background-color: white;
.card-image {
.img {
width: 330rpx;
height: 380rpx;
border-radius: 12px 12px 0px 0px;
}
}
.card-bottom {
display: flex;
margin-top: 34rpx;
.bottom-left {
margin-left: 25rpx;
.bottom-info {
margin-bottom: 10rpx;
font-size: 15px;
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 450;
color: #222222;
overflow: hidden;
white-space: nowrap;
width: 256rpx;
text-overflow: ellipsis;
.gender {
width: 40rpx;
height: 40rpx;
margin-left: 16rpx;
vertical-align: middle;
}
}
.bottom-address {
font-size: 14px;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #848484;
margin-top: 20rpx;
margin-bottom: 50rpx;
overflow: hidden;
white-space: nowrap;
width: 256rpx;
text-overflow: ellipsis;
}
}
}
}
}
}
</style>
......@@ -297,23 +297,11 @@ export default {
}
},
backbar() {
if (this.share != null && this.share == "true") {
if (uni.getStorageSync('userInfo')) {
uni.switchTab({
url: '/pages/tab/index'
});
} else {
uni.reLaunch({
url: '/pageslogin/index/index'
});
}
} else {
uni.navigateBack({
delta: 1, //返回层数,2则上上页
})
}
}
}
};
</script>
......
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