显示发布者昵称、头像

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

View File

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

View File

@ -26,10 +26,10 @@
<view class="disjbac"> <view class="disjbac">
<view class="disac"> <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="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 class="fon20 col9" style="margin-top: 6rpx;">{{detailObj.published_at}}发布</view>
</view> </view>
@ -285,7 +285,8 @@
dataShopList:[], dataShopList:[],
timeList:[], timeList:[],
isHot:false, isHot:false,
isAutoPlay:false isAutoPlay:false,
fabImg:''
} }
}, },
onPageScroll(e) { onPageScroll(e) {
@ -527,7 +528,10 @@
}).exec() }).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 = { let maiOjb = {
e:1,//访 e:1,//访
c:this.detailObj.id*1, c:this.detailObj.id*1,
@ -570,6 +574,8 @@
// xgList // xgList
if(res.data.diary.length!=0){ if(res.data.diary.length!=0){
res.data.diary.forEach(item=>{ res.data.diary.forEach(item=>{
let fabImg = '';
if(item.published_headimgurl!='' && item.published_headimgurl!=null) fabImg = this.$http + item.published_headimgurl;
let tObj = { let tObj = {
category_id:item.category_id,//ID category_id:item.category_id,//ID
id:item.id, id:item.id,
@ -580,8 +586,8 @@
video:this.$http + item.video,// video:this.$http + item.video,//
title:item.title,// title:item.title,//
content:item.subtitle,// content:item.subtitle,//
head_img:'/static/public/logo.png',// head_img: fabImg || '/static/public/logo.png',//
name:'恒美植发',// name:item.published_by || '恒美植发',//
isVideo:item.video.includes(".mp4")// isVideo:item.video.includes(".mp4")//
} }
if(item.cover!='' && item.video==''){ if(item.cover!='' && item.video==''){

View File

@ -190,6 +190,8 @@
this.total = res.data.list.total this.total = res.data.list.total
if(res.data.list.list.length!=0){ if(res.data.list.list.length!=0){
res.data.list.list.forEach(item=>{ res.data.list.list.forEach(item=>{
let fabImg = '';
if(item.published_headimgurl!='' && item.published_headimgurl!=null) fabImg = this.$http + item.published_headimgurl;
let tObj = { let tObj = {
category_id:item.category_id,//ID category_id:item.category_id,//ID
id:item.id, id:item.id,
@ -200,8 +202,8 @@
video:this.$http + item.video,// video:this.$http + item.video,//
title:item.title,// title:item.title,//
content:item.subtitle,// content:item.subtitle,//
head_img:'/static/public/logo.png',// head_img: fabImg || '/static/public/logo.png',//
name:'恒美植发',// name:item.published_by || '恒美植发',//
isVideo:item.video.includes(".mp4")// isVideo:item.video.includes(".mp4")//
} }
if(this.newCurrent==0 && item.category_id==32) this.dataList.push(tObj) 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(e==4 && this.active!=e) this.listArrfour = []
if(res.data.list.list.length!=0){ if(res.data.list.list.length!=0){
res.data.list.list.forEach(item=>{ 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 num = item.video.search(".mp4")
let isVideo = false let isVideo = false
if(num!='-1') isVideo = true if(num!='-1') isVideo = true
@ -903,8 +905,8 @@
video:this.$http + item.video,// video:this.$http + item.video,//
title:item.title,// title:item.title,//
content:item.subtitle,// content:item.subtitle,//
head_img:'/static/public/logo.png',// head_img: fabImg || '/static/public/logo.png',//
name:'恒美植发',// name:item.published_by || '恒美植发',//
isVideo:isVideo// isVideo:isVideo//
} }
if(item.cover!=''){ 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