11
This commit is contained in:
+17
-16
@@ -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%;
|
||||
|
||||
Reference in New Issue
Block a user