Commit 1603a56a authored by 罗林杰's avatar 罗林杰

修改个人留言

parent 6707c5e1
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module.exports = { module.exports = {
// baseUrl: 'http://106.3.97.198:20162' // baseUrl: 'http://106.3.97.198:20162'
baseUrl: 'http://localhost:8092',//接口URL baseUrl: 'http://localhost:8092',//接口URL
imgUrl:'http://192.168.1.7/static/images',//图片URL imgUrl:'http://192.168.1.11/static/images',//图片URL
webViewUrl:'http://192.168.1.7:8080'//小程序跳转H5页面的URL webViewUrl:'http://192.168.1.7:8080'//小程序跳转H5页面的URL
} }
......
...@@ -252,6 +252,26 @@ ...@@ -252,6 +252,26 @@
"disableScroll": true "disableScroll": true
} }
}, },
{
"path": "message/message",
"style": {
"navigationBarTitleText": "个人留言",
"backgroundColor": "#F4F5F9",
"backgroundColorTop": "#F4F5F9",
"navigationBarBackgroundColor": "#F4F5F9",
"navigationStyle": "custom"
}
},
{
"path": "message/info",
"style": {
"navigationBarTitleText": "个人留言",
"backgroundColor": "#F4F5F9",
"backgroundColorTop": "#F4F5F9",
"navigationBarBackgroundColor": "#F4F5F9",
"navigationStyle": "custom"
}
},
{ {
"path": "set/aboutme", "path": "set/aboutme",
"style": { "style": {
......
...@@ -201,6 +201,11 @@ import {articleList, getOssUrl} from "../../api/article"; ...@@ -201,6 +201,11 @@ import {articleList, getOssUrl} from "../../api/article";
desc: "", desc: "",
img: this.$IMG_URL+"/user/myren.png", img: this.$IMG_URL+"/user/myren.png",
}, { }, {
name: "个人留言",
num: '',
desc: "",
img: this.$IMG_URL+'/user/mymessage.png',
}, {
name: "推荐给好友", name: "推荐给好友",
num: '', num: '',
desc: "", desc: "",
...@@ -210,7 +215,8 @@ import {articleList, getOssUrl} from "../../api/article"; ...@@ -210,7 +215,8 @@ import {articleList, getOssUrl} from "../../api/article";
num: '', num: '',
desc: "", desc: "",
img: this.$IMG_URL+'/user/myset.png', img: this.$IMG_URL+'/user/myset.png',
}], }
],
numtwo: 0, numtwo: 0,
tipMsg: "" tipMsg: ""
}; };
...@@ -384,13 +390,17 @@ import {articleList, getOssUrl} from "../../api/article"; ...@@ -384,13 +390,17 @@ import {articleList, getOssUrl} from "../../api/article";
}) })
} else if (i == 1) { } else if (i == 1) {
this.updateInformation(); this.updateInformation();
} else if (i == 3) { } else if (i == 4) {
uni.navigateTo({ uni.navigateTo({
url: "/pagesme/set/set" url: "/pagesme/set/set"
}) })
} else if (i == 2) { } else if (i == 3) {
} } else if (i == 2) {
uni.navigateTo({
url: "/pagesme/message/message"
})
} else if (i == 5) {}
}, },
//登录 //登录
login() { login() {
......
...@@ -203,8 +203,9 @@ ...@@ -203,8 +203,9 @@
<view v-if="isFollowed === 0" class="right" @click="logion(userData.userId, true, baseUrl+'/user/con1.png')"> <view v-if="isFollowed === 0" class="right" @click="logion(userData.userId, true, baseUrl+'/user/con1.png')">
<image :src="baseUrl+'/user/con1-no.png'" style="width: 100%;height: 100%;;" mode="aspectFill"></image> <image :src="baseUrl+'/user/con1-no.png'" style="width: 100%;height: 100%;;" mode="aspectFill"></image>
</view> </view>
<view v-else-if="isFollowed === 1" class="right" @click="logion(userData.userId, false, baseUrl+'/user/con1-no.png')"> <!-- <view v-else-if="isFollowed === 1" class="right" @click="logion(userData.userId, false, baseUrl+'/user/con1-no.png')">-->
<image :src="baseUrl+'/user/con1.png'" style="width: 100%;height: 100%;;" mode="aspectFill"></image> <view v-else-if="isFollowed === 1" class="right" >
<image :src="baseUrl+'/user/message.png'" style="width: 100%;height: 100%;;" mode="aspectFill"></image>
</view> </view>
</view> </view>
</view> </view>
......
This diff is collapsed.
<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"style="justify-content: left;display: flex">
<image class="img" src="https://cdn.uviewui.com/uview/album/1.jpg"/>
<view style="margin-left: 20rpx;margin-top: 20rpx;font-weight: 400;font-size: 32rpx">
{{ item.nickName }}
<view class="message">
{{item.message}}
</view>
</view>
</view>
<view style="margin: 20rpx 20rpx 0 0;font-size: 24rpx;color: #8a8888;">
{{ item.createTime }}
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
//图片路径
baseUrl: this.$IMG_URL,
//用户列表
userList:[],
//是否有数据
isdata: false,
//页面显示的数据类型 1我喜欢的 2喜欢我的 3互相喜欢
type:'',
//页面数据的数量
num:'',
//距离表头
navHeight:'',
share: false,
menuButtonInfo: '',
};
},
onLoad() {
//获取当前页面的页头高度
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(){
//我喜欢的
const list = [
{
nickName:'暖洋洋',
message:'你好',
createTime:'2021-08-08 12:12:12'
},
{
nickName:'暖洋洋',
message:'最近的一条信息',
createTime:'2021-08-08 12:12:12'
},
{
nickName:'暖洋洋',
message:'最近的一条信息',
createTime:'2021-08-08 12:12:12'
},
{
nickName:'暖洋洋',
message:'最近的一条信息',
createTime:'2021-08-08 12:12:12'
},
{
nickName:'暖洋洋',
message:'最近的一条信息',
createTime:'2021-08-08 12:12:12'
},
{
nickName:'暖洋洋',
message:'最近的一条信息测试长度滴滴滴滴滴滴滴滴滴滴滴滴滴滴滴滴滴滴滴滴滴滴滴滴滴滴的',
createTime:'2021-08-08 12:12:12'
},
]
this.userList = list
},
gotoBusinessDetail(){
uni.navigateTo({
url: "/pagesme/message/info"
})
},
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: 680rpx;
grid-column-gap: 22rpx;
.recommendation-card {
max-height: 180rpx;
justify-content: space-between;
display: flex;
width: 680rpx;
margin-bottom: 25rpx;
background-color: white;
.card-image {
.img {
margin: 15rpx 0 15rpx 15rpx;
width: 100rpx;
height: 100rpx;
}
}
}
}
}
.message{
max-width: 300rpx;
margin-top: 30rpx;
font-size: 24rpx;
color: #8a8888;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}
</style>
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