This commit is contained in:
zoujiandong
2025-07-22 17:15:39 +08:00
parent c44d30294c
commit 9b00f8a04b
4 changed files with 39 additions and 35 deletions
+17 -16
View File
@@ -767,18 +767,13 @@ const givePoint=()=>{
onLoad((options) => {
id.value = options.id;
type.value = options.type;
if (type.value == "article") {
getArticleDetail(options.id);
} else if (type.value == "video") {
getVideoDetail(options.id);
} else {
getExchangeDetail(options.id);
}
readRecord()
let userInfo=uni.getStorageSync('userInfo');
if(userInfo.user_id){
user_id.value=userInfo.user_id;
}
readRecord()
});
const clearComment = () => {
parent_id.value = null;
@@ -1617,7 +1612,7 @@ const addVote = () => {
getExchangeDetail(id.value);
});
};
const readRecord=()=>{
const readRecord= async()=>{
let flag=1;
if(type.value=='article'){
flag=1;
@@ -1627,15 +1622,19 @@ const readRecord=()=>{
flag=3;
}
api.readRecord({
const res=api.readRecord({
type:flag,
id:id.value
}).then((res)=>{
// uni.showToast({
// icon: "none",
// title: "阅读记录已添加!",
// });
});
})
if(res){
if (type.value == "article") {
getArticleDetail(id.value);
} else if (type.value == "video") {
getVideoDetail(id.value);
} else {
getExchangeDetail(id.value);
}
}
}
</script>
@@ -2032,6 +2031,8 @@ const readRecord=()=>{
margin: 0rpx 12rpx;
}
.desc {
width:100%;
overflow-x:hidden;
padding-bottom: 80rpx;
:deep(.imgstyle){
max-width:100%;