消息@我的

This commit is contained in:
zhaofang
2022-11-09 19:16:20 +08:00
parent 1bbd397ba4
commit 6f961650d2
6 changed files with 343 additions and 77 deletions

161
components/at-my/at-my.vue Normal file
View File

@@ -0,0 +1,161 @@
<template>
<view class="at-my-com">
<view class="at-my-index" v-for="at in items">
<view class="at-who">
<view class="who-img">
<author-img :avatar="at.authorInfo.avatar" :sex="at.authorInfo.sex"></author-img>
<!-- <image style="width: 80upx;height: 80upx;" src="../../static/images/woman.png" mode=""></image> -->
</view>
<view class="who-name">
<view class="name-info">
{{at.sysCreateBy}} <view class="who-time">{{at.sysCreateTime}}</view>
</view>
<view class="info-text">
<text class="name-text-at">@</text>
{{filterObjType(at.objType)}}不错你也来看看吧
</view>
</view>
</view>
<view class="at-title-box" @click="toArticleDetail(at)">
<view class="at-name">{{at.title}}</view>
</view>
</view>
</view>
</template>
<script>
import apiQa from '@/api/modules/qa.js'
import apiComments from '../../api/modules/comments.js';
export default {
props:{
items:{
type:Array,
}
},
data() {
return {
// data:[],//拿到的数据
// total:0,//总条数
// loadStatus:'more',//more,loading,noMore
// query:{
// pageIndex:1,//当前页
// type:null,//当前只限于文章
// pageSize:10,//条数
// },//查询条件
}
},
// onLoad() {
// this.findData(true);
// },
// onPullDownRefresh() {
// this.onReachBottom();
// },
// onReachBottom() {
// console.log('111111')
// this.loadStatus='loading';//more,loading,noMore
// if(this.data.length<this.total){
// this.query.pageIndex++;
// this.findData(false);
// this.loadStatus='more'
// }else{
// this.loadStatus='noMore'
// }
// },
mounted() {
// this.findData(true);
},
methods: {
filterObjType(objType){
switch(objType){
case 1:{
return '课程'
}
case 2:{
return '文章'
}
case 3:{
return '案例'
}
case 4:{
return '问答'
}
}
},
toArticleDetail(item) {
if(item.objType == 2){
uni.navigateTo({
url: '/pages/resource/articeDetail?id=' + item.objId
});
}else if(item.objType == 1){
uni.navigateTo({
url: '/pages/resource/courseDetail?id=' + item.objId
});
}else if(item.objType == 4){
uni.navigateTo({
url: '/pages/resource/qaDetail?id=' + item.objId
});
}
},
}
}
</script>
<style scoped lang="scss">
.at-my-com{
padding: 0 32upx;
.at-my-index{
padding: 60upx 0 50upx 0;
border-bottom: 2upx solid rgba(153,153,153,0.1);
.at-who{
display: flex;
.who-img{
margin-right: 20upx;
}
.who-name{
width: 100%;
font-size: 28upx;
.name-info{
font-weight: 600;
color: #333333;
}
.who-time{
float: right;
font-weight: 400;
font-size: 24upx;
color: #999999;
}
.info-text{
margin-top: 8upx;
color: #333333;
.name-text-at{
margin-right: 20upx;
color: #387DF7;
}
}
}
}
.at-title-box{
margin-top: 22upx;
padding: 40upx 60upx;
background: #F6F6F6;
font-size: 32upx;
font-weight: 600;
color: #333333;
}
.at-name{
word-break:break-all;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
display: -webkit-box;-webkit-line-clamp: 1;
}
}
}
</style>

View File

@@ -103,7 +103,7 @@
return{
courseSysTypeTree:[],
courseScenceList:[],
filterShow:true,//是否显示过虑器
filterShow:false,//是否显示过虑器
// filterWidth:'300px',
sysTypeTow:[],
sysTypeThree:[],

View File

@@ -0,0 +1,95 @@
<template>
<view>
<view class="news-page-btn">
<view class="btn-index">多选</view>
<view class="btn-index">清空</view>
<view class="btn-index">一键已读</view>
</view>
<view class="news-page-list">
<view class="list-index" v-for="item in 5">
<view class="list-index-img">
<image style="width:80upx;height:80upx" src="../../static/images/woman.png" mode=""></image>
</view>
<view class="list-index-cen">
<view class="cen-name">
李沐沐
</view>
<view class="cen-text">
收藏了你发布的课程···
</view>
</view>
<view class="list-index-time">
2022/9/20
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
.news-page-btn{
height: 80upx;
padding: 30upx 32upx 0 36upx;
.btn-index{
font-size: 28upx;
color: #666666;
float: right;
margin-left: 20upx;
padding: 6upx 32upx 6upx 28upx;
border: 2upx solid rgba(153,153,153,0.2);
border-radius: 26upx;
}
.btn-index:first-child{
margin-left: 0;
float: left;
}
}
.news-page-list{
padding: 0 32upx 0 36upx;
box-sizing: border-box;
.list-index{
display: flex;
padding: 40upx 0;
border-bottom: 2upx solid rgba(153,153,153,0.1);;
.list-index-img{
width: 80upx;
}
.list-index-cen{
margin-left: 30upx;
width: 100%;
.cen-name{
font-size: 28upx;
font-weight: 500;
color: #333333;
margin-top: 4upx;
}
.cen-text{
font-size: 24upx;
color: #999999;
margin-top: 4upx;
}
}
.list-index-time{
margin-top: 4upx;
width: 130upx;
font-size: 24upx;
color: #999999;
}
}
}
</style>