This commit is contained in:
2025-08-13 14:53:35 +08:00
parent 1f5f069988
commit b2009403d8
13 changed files with 761 additions and 282 deletions

View File

@@ -5,7 +5,14 @@
bgColor="#5188e5"
fontColor="#fff"
:backState="2000"
></z-nav-bar>
>
<template v-slot:right v-if="activeTab === 1">
<view class="top_right" @tap="createFolder" style="margin-right: 20rpx;">
<uni-icons type="folder-add" size="17" color="#fff"></uni-icons>
<text>发布文章</text>
</view>
</template>
</z-nav-bar>
<view
class="doctors_module"
:style="`top: ${42 + statusBarHeight}px;`"
@@ -68,8 +75,8 @@
:scroll-top="scrollTop"
@scrolltolower="loadMore"
:style="`
height: calc(100vh - ${activeTab == 0 ? 320 : 200}rpx);
margin-top: ${activeTab == 0 ? 260 : 100}rpx;
height: calc(100vh - ${activeTab == 0 ? 320 : 180}rpx);
margin-top: ${activeTab == 0 ? 260 : 80}rpx;
padding-bottom: 140rpx;`"
v-if="show == true"
>
@@ -189,7 +196,7 @@
</view> -->
<Dynamic
v-for="(item, index) in list"
key="id"
:key="item.id"
:imgList="item.fileList1"
:avatar="item.taihuTalent.icon"
:name="item.taihuTalent.name"
@@ -222,7 +229,9 @@
<z-navigation></z-navigation>
<common-pinglun ref="pinglun" @close="close"></common-pinglun>
<common-likeList ref="commonLikeList" @close="close"></common-likeList>
<uni-popup ref="share" type="share" safeArea backgroundColor="#fff">
<uni-popup-share @select="haveSelected"></uni-popup-share>
</uni-popup>
</view>
</template>
@@ -236,6 +245,7 @@ import commonLikeList from "../articleList/likeList.vue";
export default {
data() {
return {
shareId: null,
activeTab: 0,
tabsList: [],
currentCateIndex: 0,
@@ -272,8 +282,13 @@ export default {
this.current = 1;
this.list = [];
this.noMore = false;
if (this.activeTab == 0) {
this.getListData(this.tabsList[this.currentCateIndex].id);
} else {
this.getArticleListData();
}
this.getListData(this.tabsList[this.currentCateIndex].id);
uni.stopPullDownRefresh();
this.isRefreshing = false;
console.log("下拉刷新已停止");
@@ -285,6 +300,57 @@ export default {
},
onShow() {},
methods: {
createFolder() {
uni.navigateTo({
url: `/pages/articleList/article?navTitle=文章&title=文章&type=add`,
});
},
newOnShare() {
this.$refs.share.open();
},
haveSelected() {
var data = this.list.find((item) => item.id == this.shareId);
let image = "";
data.img && data.img != ""
? (image = data.img.split(",")[0])
: (image = "static/logo_zi.png");
console.log(data, " 选择的是");
if (data.index == 0) {
// 分享到好友
uni.share({
provider: "weixin",
scene: "WXSceneSession",
type: 0,
href: this.$apkUrl,
title: `我在【太湖云医】发布了文章 “ ${data.title} ”`,
// summary: `${this.productInfo.content}`,
imageUrl: image,
success: function (res) {
console.log("success:" + JSON.stringify(res));
},
fail: function (err) {
console.log("fail:" + JSON.stringify(err));
},
});
} else if (data.index == 1) {
// 分享到朋友圈
uni.share({
provider: "weixin",
scene: "WXSceneTimeline",
type: 0,
href: this.$apkUrl,
title: `我在【太湖云医】发布了文章 “ ${data.title} ”`,
// summary: `${this.taskInfo.content}`,
imageUrl: image,
success: function (res) {
console.log("success:" + JSON.stringify(res));
},
fail: function (err) {
console.log("fail:" + JSON.stringify(err));
},
});
}
},
clickDynamic(id) {
//评论
console.log("childDynamic");
@@ -300,7 +366,7 @@ export default {
console.log(e);
console.log("childUser");
},
close(id){
close(id) {
this.getArticleDetail(id);
},
@@ -324,13 +390,13 @@ export default {
this.getArticleDetail(id);
this.$forceUpdate();
});
} else if (type == "pinglun") {
this.$refs.pinglun.onHandleClickOpenComment(id);
} else if (type == "likeList") {
this.$refs.commonLikeList.onHandleClickOpenComment(id);
} else if (type == "share") {
this.shareId = id;
this.newOnShare();
}
},