Commit a35ab002 authored by liwei's avatar liwei

修改了会员详情动态

parent b4d4c0b1
...@@ -256,6 +256,11 @@ import {articleList, getOssUrl, userArticleList} from "../../api/article"; ...@@ -256,6 +256,11 @@ import {articleList, getOssUrl, userArticleList} from "../../api/article";
share: false, share: false,
}; };
}, },
onLoad(options) {
if (options.share != null) {
this.share = options.share;
}
},
onShow(){ onShow(){
this.nologin = true this.nologin = true
this.userInfo = uni.getStorageSync('userInfo') this.userInfo = uni.getStorageSync('userInfo')
...@@ -285,9 +290,6 @@ import {articleList, getOssUrl, userArticleList} from "../../api/article"; ...@@ -285,9 +290,6 @@ import {articleList, getOssUrl, userArticleList} from "../../api/article";
}) })
} }
this.articleImg = [] this.articleImg = []
if (options.share != null) {
this.share = options.share;
}
}, },
methods: { methods: {
/** /**
......
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
<view class="safe-bottom"> <view class="safe-bottom">
<!-- 动态图片--> <!-- 动态图片-->
<view class="card" style="height: auto;" <view class="card" style="height: auto;"
v-if="(userData.articleImg !== null && userData.articleImg.length) || userData.articleContent !== null"> v-if="(articleUrl !== null && articleUrl.length) || userData.articleContent !== null">
<view class="content"> <view class="content">
<view class="have_image_two"> <view class="have_image_two">
<view class="have_image_title"> <view class="have_image_title">
...@@ -111,8 +111,8 @@ ...@@ -111,8 +111,8 @@
<view class="strs" v-if="userData.articleContent !== null"> <view class="strs" v-if="userData.articleContent !== null">
{{userData.articleContent}} {{userData.articleContent}}
</view> </view>
<view :class="['imgs',userData.articleImg.length == 2 ? 'twoTemp':'']" v-if="userData.articleImg !== null && userData.articleImg.length"> <view :class="['imgs',articleUrl.length == 2 ? 'twoTemp':'']" v-if="articleUrl !== null && articleUrl.length">
<image v-for="item in userData.articleImg" :src="item" <image v-for="item in articleUrl" :src="item"
mode="aspectFill"> mode="aspectFill">
</image> </image>
</view> </view>
...@@ -208,7 +208,7 @@ ...@@ -208,7 +208,7 @@
import {parseDate,calculateAge} from '../common/index' import {parseDate,calculateAge} from '../common/index'
import LsSwiper from '../components/ls-swiper/index.vue'; import LsSwiper from '../components/ls-swiper/index.vue';
import myPopup from '@/components/myPopup.vue' import myPopup from '@/components/myPopup.vue'
import {getOssUrl} from "../api/article"; import {getOssUrl, userArticleList} from "../api/article";
import {getDict} from "../api/system/dict/data"; import {getDict} from "../api/system/dict/data";
import ELM from '@/components/elm-toast/index.vue'; import ELM from '@/components/elm-toast/index.vue';
export default { export default {
...@@ -223,6 +223,7 @@ ...@@ -223,6 +223,7 @@
baseUrl: this.$IMG_URL, baseUrl: this.$IMG_URL,
//用户头像 //用户头像
imgList:[], imgList:[],
articleUrl:[],
//是否关注 0:未关注 1:已关注 //是否关注 0:未关注 1:已关注
isFollowed: '0', isFollowed: '0',
//用户信息 //用户信息
...@@ -282,54 +283,9 @@ ...@@ -282,54 +283,9 @@
} }
}) })
}, },
onHide() {
this.share = null;
},
onShow() { onShow() {
this.showAnima = false; this.showAnima = false;
}, },
onReachBottom(e) {
this.bottom_offset = true;
},
onPageScroll(e) {
if (!this.isInit) {
return;
}
const _this = this;
if (e.scrollTop <= 0) {
this.showArrowDown = true;
return;
}
this.showArrowDown = false;
if (this.scrollTop - e.scrollTop > 50) {
this.bottom_offset = false;
}
if (this.bottom_offset) {
return;
}
if (!_this.flag) {
setTimeout(() => {
if (e.scrollTop > _this.scrollTop) {
uni.hideTabBar({
animation: true,
success() {
_this.showTabbar = false;
}
});
} else if (e.scrollTop < _this.scrollTop) {
uni.showTabBar({
animation: true,
success() {
_this.showTabbar = true;
}
});
}
_this.scrollTop = e.scrollTop;
_this.flag = false;
}, 100);
}
_this.flag = true;
},
methods: { methods: {
//获取点赞花费金币数 //获取点赞花费金币数
getUserLikeDict(){ getUserLikeDict(){
...@@ -382,14 +338,38 @@ ...@@ -382,14 +338,38 @@
this.userData.memRealAuthen = getValue('realAuthen',res.data.data.memRealAuthen) this.userData.memRealAuthen = getValue('realAuthen',res.data.data.memRealAuthen)
} }
//处理动态 //处理动态
if (res.data.data.articleContent !== '' && res.data.data.articleContent !== null){ // if (res.data.data.articleContent !== '' && res.data.data.articleContent !== null){
this.userData.articleContent = '我喜欢吃鱼我喜欢吃鱼我喜欢吃鱼我喜欢吃鱼我喜欢吃鱼我喜欢吃鱼我喜欢吃鱼' // this.userData.articleContent = '我喜欢吃鱼我喜欢吃鱼我喜欢吃鱼我喜欢吃鱼我喜欢吃鱼我喜欢吃鱼我喜欢吃鱼'
this.userData.articleImg = [ this.userData.articleImg1 = [
'http://192.168.1.7/upload/CmsActivity/20241230/E3994EF11C524D48AD88D383A2B5786B.jpg', 'http://192.168.1.7/upload/CmsActivity/20241230/E3994EF11C524D48AD88D383A2B5786B.jpg',
'http://192.168.1.7/upload/CmsBanner/20241230/18E63B570FF04DB3A8EFE277D58256C4.jpg', 'http://192.168.1.7/upload/CmsBanner/20241230/18E63B570FF04DB3A8EFE277D58256C4.jpg',
'http://192.168.1.7/upload/CmsBanner/20241230/18E63B570FF04DB3A8EFE277D58256C4.jpg' 'http://192.168.1.7/upload/CmsBanner/20241230/18E63B570FF04DB3A8EFE277D58256C4.jpg'
] ]
} const params = {
page:1,
rows:1,
userId: this.userId,
isFollowed: '0'//0 1无所谓 当未关注的查
}
userArticleList(params).then( res =>{
const list = res.data.data
//处理动态照片
if (list[0].pictureId != null){
const urlArray = JSON.parse(list[0].pictureId)
if (urlArray.id.length > 0){
urlArray.id.forEach(item => {
getOssUrl(item).then(imgRes => {
if (imgRes.data.data != null) {
imgRes.data.data = imgRes.data.data.replace(/\\/g, "/");
this.articleUrl.push(imgRes.data.data)
}
})
})
this.userData.articleContent = list[0].content
}
}
})
// }
//处理地址 //处理地址
if (res.data.data.memResidenceProvince !== '' && res.data.data.memResidenceProvince !== null && res.data.data.memResidenceCity !== '' && res.data.data.memResidenceCity !== null){ if (res.data.data.memResidenceProvince !== '' && res.data.data.memResidenceProvince !== null && res.data.data.memResidenceCity !== '' && res.data.data.memResidenceCity !== null){
this.userData.city = getCity(res.data.data.memResidenceProvince,res.data.data.memResidenceCity) this.userData.city = getCity(res.data.data.memResidenceProvince,res.data.data.memResidenceCity)
......
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