mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-11 03:46:47 +08:00
我的收藏头像
This commit is contained in:
@@ -13,7 +13,6 @@
|
|||||||
<view class="top-bar-tab" @click="clicktab(4)" :class="{ active: conType == 4 }">问答</view>
|
<view class="top-bar-tab" @click="clicktab(4)" :class="{ active: conType == 4 }">问答</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-if="conType == 1">
|
<view v-if="conType == 1">
|
||||||
<view v-for="(item, idx) in courseList" :key="idx" class="course_box">
|
<view v-for="(item, idx) in courseList" :key="idx" class="course_box">
|
||||||
<view class="course" @click="toCourseDetail(item)">
|
<view class="course" @click="toCourseDetail(item)">
|
||||||
@@ -29,8 +28,7 @@
|
|||||||
<text style="font-weight: bold; font-size: 32rpx;" v-html="$keywordActiveShow(item.title, query.keyword)"></text>
|
<text style="font-weight: bold; font-size: 32rpx;" v-html="$keywordActiveShow(item.title, query.keyword)"></text>
|
||||||
</view>
|
</view>
|
||||||
<view class="course-content">
|
<view class="course-content">
|
||||||
<!-- <author-info :avatar="item.avatar" :name="item.question.sysCreateBy" :info="item.orgInfo" :sex="item.sex"></author-info> -->
|
<author-info :avatar="item.avatar" :name="item.authorName" :info="item.orgInfo" :sex="item.sex"></author-info>
|
||||||
<view class="course-text">{{ item.authorName }}</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -212,7 +210,13 @@ export default {
|
|||||||
let userIds = [];
|
let userIds = [];
|
||||||
if (this.conType == 1) {
|
if (this.conType == 1) {
|
||||||
rs.result.list.forEach(item => {
|
rs.result.list.forEach(item => {
|
||||||
|
console.log(item)
|
||||||
|
item.avatar = '';
|
||||||
|
item.orgInfo = '';
|
||||||
|
item.sex = null;
|
||||||
|
userIds.push(item.authorId);
|
||||||
this.courseList.push(item);
|
this.courseList.push(item);
|
||||||
|
this.loadUserInfos(rs.result.list, userIds);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (this.conType == 2) {
|
if (this.conType == 2) {
|
||||||
@@ -256,7 +260,7 @@ export default {
|
|||||||
res.result.some(author => {
|
res.result.some(author => {
|
||||||
if (author.aid == item.sysCreateAid) {
|
if (author.aid == item.sysCreateAid) {
|
||||||
if (author.avatar != '') {
|
if (author.avatar != '') {
|
||||||
item.avatar = $this.$config.fileUrl + author.avatar;
|
item.avatar = author.avatar;
|
||||||
} else {
|
} else {
|
||||||
item.avatar = '';
|
item.avatar = '';
|
||||||
}
|
}
|
||||||
@@ -267,12 +271,29 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else if (this.conType == 1){
|
||||||
|
list.forEach(item => {
|
||||||
|
res.result.some(author => {
|
||||||
|
if (author.aid == item.authorId) {
|
||||||
|
if (author.avatar != '') {
|
||||||
|
item.avatar = author.avatar;
|
||||||
|
} else {
|
||||||
|
item.avatar = '';
|
||||||
|
}
|
||||||
|
item.sex = author.sex;
|
||||||
|
item.orgInfo = author.orgInfo;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else if (this.conType == 4) {
|
||||||
list.forEach(item => {
|
list.forEach(item => {
|
||||||
res.result.some(author => {
|
res.result.some(author => {
|
||||||
if (author.aid == item.question.sysCreateAid) {
|
if (author.aid == item.question.sysCreateAid) {
|
||||||
if (author.avatar != '') {
|
if (author.avatar != '') {
|
||||||
item.avatar = $this.$config.fileUrl + author.avatar;
|
item.avatar = author.avatar;
|
||||||
} else {
|
} else {
|
||||||
item.avatar = '';
|
item.avatar = '';
|
||||||
}
|
}
|
||||||
@@ -575,7 +596,7 @@ export default {
|
|||||||
/deep/ .course-info {
|
/deep/ .course-info {
|
||||||
display: flex;
|
display: flex;
|
||||||
uni-image{
|
uni-image{
|
||||||
border-radius:8upx;
|
// border-radius:8upx;
|
||||||
}
|
}
|
||||||
.course-title{
|
.course-title{
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
Reference in New Issue
Block a user