显示发布者昵称、头像

master
chen 2021-11-18 17:34:08 +08:00
parent 1b930500e5
commit 6aa39120fd
29 changed files with 58 additions and 40 deletions

View File

@ -316,6 +316,8 @@
if(res.data.list.list.length!=0){
this.total = res.data.list.total
res.data.list.list.forEach(item=>{
let fabImg = '';
if(item.published_headimgurl!='' && item.published_headimgurl!=null) fabImg = this.$http + item.published_headimgurl;
let tObj = {
category_id:item.category_id,//ID
id:item.id,
@ -326,8 +328,8 @@
video:this.$http + item.video,//
title:item.title,//
content:item.subtitle,//
head_img:'/static/public/logo.png',//
name:'恒美植发',//
head_img: fabImg || '/static/public/logo.png',//
name:item.published_by || '恒美植发',//
isVideo:item.video.includes(".mp4")//
}
if(this.newCurrent==0 && item.category_id==32) this.dataList.push(tObj)

View File

@ -434,6 +434,8 @@
if(res.data.list.list.length!=0){
this.total = res.data.list.total
res.data.list.list.forEach(item=>{
let fabImg = '';
if(item.published_headimgurl!='' && item.published_headimgurl!=null) fabImg = this.$http + item.published_headimgurl;
let ktObj = {
category_id:item.category_id,//ID
id:item.id,
@ -444,8 +446,8 @@
video:this.$http + item.video,//
title:item.title,//
content:item.subtitle,//
head_img:'/static/public/logo.png',//
name:'恒美植发',//
head_img: fabImg || '/static/public/logo.png',//
name:item.published_by || '恒美植发',//
isVideo:item.video.includes(".mp4")//
}
this.dataList.push(ktObj)

View File

@ -166,6 +166,8 @@
this.total = res.data.list.total
if(res.data.list.list.length!=0){
res.data.list.list.forEach(item=>{
let fabImg = '';
if(item.published_headimgurl!='' && item.published_headimgurl!=null) fabImg = this.$http + item.published_headimgurl;
let tObj = {
category_id:item.category_id,//ID
id:item.id,
@ -176,8 +178,8 @@
video:this.$http + item.video,//
title:item.title,//
content:item.subtitle,//
head_img:'/static/public/logo.png',//
name:'恒美植发',//
head_img: fabImg || '/static/public/logo.png',//
name:item.published_by || '恒美植发',//
isVideo:item.video.includes(".mp4")//
}
if(this.newCurrent==0 && item.category_id==32) this.dataList.push(tObj)

View File

@ -310,6 +310,8 @@
if(res.data.list.list.length!=0){
uni.hideToast()
res.data.list.list.forEach(item=>{
let fabImg = '';
if(item.published_headimgurl!='' && item.published_headimgurl!=null) fabImg = this.$http + item.published_headimgurl;
let tObj = {
category_id:item.category_id,//ID
id:item.id,
@ -320,8 +322,8 @@
video:this.$http + item.video,//
title:item.title,//
content:item.subtitle,//
head_img:'/static/public/logo.png',//
name:'恒美植发',//
head_img: fabImg || '/static/public/logo.png',//
name:item.published_by || '恒美植发',//
isVideo:item.video.includes(".mp4")//
}
if(this.newCurrent==0 && item.category_id==32) this.dataList.push(tObj)

View File

@ -26,10 +26,10 @@
<view class="disjbac">
<view class="disac">
<!-- 发布者头像 -->
<image class="flexs" src="/static/public/logo.png" style="width: 60rpx;height: 60rpx;border-radius: 100%;" mode="aspectFill"></image>
<image class="flexs" :src="fabImg || '/static/public/logo.png'" style="width: 60rpx;height: 60rpx;border-radius: 100%;" mode="aspectFill"></image>
<view class="mar-z10">
<!-- 发布者昵称 -->
<view class="fon28 col3 clips1">恒美植发</view>
<view class="fon28 col3 clips1">{{detailObj.published_by || '恒美植发'}}</view>
<!-- 发布时间 -->
<view class="fon20 col9" style="margin-top: 6rpx;">{{detailObj.published_at}}发布</view>
</view>
@ -285,7 +285,8 @@
dataShopList:[],
timeList:[],
isHot:false,
isAutoPlay:false
isAutoPlay:false,
fabImg:''
}
},
onPageScroll(e) {
@ -527,7 +528,10 @@
}).exec()
}
//
this.detailObj = res.data.detail
this.detailObj = res.data.detail;
if(this.detailObj.published_headimgurl!=''){
this.fabImg = this.$http + this.detailObj.published_headimgurl;
}
let maiOjb = {
e:1,//访
c:this.detailObj.id*1,
@ -570,6 +574,8 @@
// xgList
if(res.data.diary.length!=0){
res.data.diary.forEach(item=>{
let fabImg = '';
if(item.published_headimgurl!='' && item.published_headimgurl!=null) fabImg = this.$http + item.published_headimgurl;
let tObj = {
category_id:item.category_id,//ID
id:item.id,
@ -580,8 +586,8 @@
video:this.$http + item.video,//
title:item.title,//
content:item.subtitle,//
head_img:'/static/public/logo.png',//
name:'恒美植发',//
head_img: fabImg || '/static/public/logo.png',//
name:item.published_by || '恒美植发',//
isVideo:item.video.includes(".mp4")//
}
if(item.cover!='' && item.video==''){

View File

@ -190,6 +190,8 @@
this.total = res.data.list.total
if(res.data.list.list.length!=0){
res.data.list.list.forEach(item=>{
let fabImg = '';
if(item.published_headimgurl!='' && item.published_headimgurl!=null) fabImg = this.$http + item.published_headimgurl;
let tObj = {
category_id:item.category_id,//ID
id:item.id,
@ -200,8 +202,8 @@
video:this.$http + item.video,//
title:item.title,//
content:item.subtitle,//
head_img:'/static/public/logo.png',//
name:'恒美植发',//
head_img: fabImg || '/static/public/logo.png',//
name:item.published_by || '恒美植发',//
isVideo:item.video.includes(".mp4")//
}
if(this.newCurrent==0 && item.category_id==32) this.dataList.push(tObj)

View File

@ -890,6 +890,8 @@
if(e==4 && this.active!=e) this.listArrfour = []
if(res.data.list.list.length!=0){
res.data.list.list.forEach(item=>{
let fabImg = '';
if(item.published_headimgurl!='' && item.published_headimgurl!=null) fabImg = this.$http + item.published_headimgurl;
let num = item.video.search(".mp4")
let isVideo = false
if(num!='-1') isVideo = true
@ -903,8 +905,8 @@
video:this.$http + item.video,//
title:item.title,//
content:item.subtitle,//
head_img:'/static/public/logo.png',//
name:'恒美植发',//
head_img: fabImg || '/static/public/logo.png',//
name:item.published_by || '恒美植发',//
isVideo:isVideo//
}
if(item.cover!=''){

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long