11
This commit is contained in:
parent
c44d30294c
commit
9b00f8a04b
@ -767,18 +767,13 @@ const givePoint=()=>{
|
|||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
id.value = options.id;
|
id.value = options.id;
|
||||||
type.value = options.type;
|
type.value = options.type;
|
||||||
if (type.value == "article") {
|
readRecord()
|
||||||
getArticleDetail(options.id);
|
|
||||||
} else if (type.value == "video") {
|
|
||||||
getVideoDetail(options.id);
|
|
||||||
} else {
|
|
||||||
getExchangeDetail(options.id);
|
|
||||||
}
|
|
||||||
let userInfo=uni.getStorageSync('userInfo');
|
let userInfo=uni.getStorageSync('userInfo');
|
||||||
if(userInfo.user_id){
|
if(userInfo.user_id){
|
||||||
user_id.value=userInfo.user_id;
|
user_id.value=userInfo.user_id;
|
||||||
}
|
}
|
||||||
readRecord()
|
|
||||||
});
|
});
|
||||||
const clearComment = () => {
|
const clearComment = () => {
|
||||||
parent_id.value = null;
|
parent_id.value = null;
|
||||||
@ -1617,7 +1612,7 @@ const addVote = () => {
|
|||||||
getExchangeDetail(id.value);
|
getExchangeDetail(id.value);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const readRecord=()=>{
|
const readRecord= async()=>{
|
||||||
let flag=1;
|
let flag=1;
|
||||||
if(type.value=='article'){
|
if(type.value=='article'){
|
||||||
flag=1;
|
flag=1;
|
||||||
@ -1627,15 +1622,19 @@ const readRecord=()=>{
|
|||||||
flag=3;
|
flag=3;
|
||||||
}
|
}
|
||||||
|
|
||||||
api.readRecord({
|
const res=api.readRecord({
|
||||||
type:flag,
|
type:flag,
|
||||||
id:id.value
|
id:id.value
|
||||||
}).then((res)=>{
|
})
|
||||||
// uni.showToast({
|
if(res){
|
||||||
// icon: "none",
|
if (type.value == "article") {
|
||||||
// title: "阅读记录已添加!",
|
getArticleDetail(id.value);
|
||||||
// });
|
} else if (type.value == "video") {
|
||||||
});
|
getVideoDetail(id.value);
|
||||||
|
} else {
|
||||||
|
getExchangeDetail(id.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -2032,6 +2031,8 @@ const readRecord=()=>{
|
|||||||
margin: 0rpx 12rpx;
|
margin: 0rpx 12rpx;
|
||||||
}
|
}
|
||||||
.desc {
|
.desc {
|
||||||
|
width:100%;
|
||||||
|
overflow-x:hidden;
|
||||||
padding-bottom: 80rpx;
|
padding-bottom: 80rpx;
|
||||||
:deep(.imgstyle){
|
:deep(.imgstyle){
|
||||||
max-width:100%;
|
max-width:100%;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -182,18 +182,11 @@ const _sfc_main = {
|
|||||||
common_vendor.onLoad((options) => {
|
common_vendor.onLoad((options) => {
|
||||||
id.value = options.id;
|
id.value = options.id;
|
||||||
type.value = options.type;
|
type.value = options.type;
|
||||||
if (type.value == "article") {
|
readRecord();
|
||||||
getArticleDetail(options.id);
|
|
||||||
} else if (type.value == "video") {
|
|
||||||
getVideoDetail(options.id);
|
|
||||||
} else {
|
|
||||||
getExchangeDetail(options.id);
|
|
||||||
}
|
|
||||||
let userInfo = common_vendor.index.getStorageSync("userInfo");
|
let userInfo = common_vendor.index.getStorageSync("userInfo");
|
||||||
if (userInfo.user_id) {
|
if (userInfo.user_id) {
|
||||||
user_id.value = userInfo.user_id;
|
user_id.value = userInfo.user_id;
|
||||||
}
|
}
|
||||||
readRecord();
|
|
||||||
});
|
});
|
||||||
const clearComment = () => {
|
const clearComment = () => {
|
||||||
parent_id.value = null;
|
parent_id.value = null;
|
||||||
@ -327,18 +320,18 @@ const _sfc_main = {
|
|||||||
};
|
};
|
||||||
const close = () => {
|
const close = () => {
|
||||||
showCommentDialog.value = false;
|
showCommentDialog.value = false;
|
||||||
common_vendor.index.__f__("log", "at pages/detail/detail.vue:930", "close");
|
common_vendor.index.__f__("log", "at pages/detail/detail.vue:925", "close");
|
||||||
};
|
};
|
||||||
const openDeal = () => {
|
const openDeal = () => {
|
||||||
showDeal.value = true;
|
showDeal.value = true;
|
||||||
common_vendor.index.__f__("log", "at pages/detail/detail.vue:935", "open");
|
common_vendor.index.__f__("log", "at pages/detail/detail.vue:930", "open");
|
||||||
};
|
};
|
||||||
const closeDeal = () => {
|
const closeDeal = () => {
|
||||||
showDeal.value = false;
|
showDeal.value = false;
|
||||||
};
|
};
|
||||||
const openMore = () => {
|
const openMore = () => {
|
||||||
showMore.value = true;
|
showMore.value = true;
|
||||||
common_vendor.index.__f__("log", "at pages/detail/detail.vue:943", "open");
|
common_vendor.index.__f__("log", "at pages/detail/detail.vue:938", "open");
|
||||||
};
|
};
|
||||||
const closeMore = () => {
|
const closeMore = () => {
|
||||||
showMore.value = false;
|
showMore.value = false;
|
||||||
@ -376,12 +369,12 @@ const _sfc_main = {
|
|||||||
success(res) {
|
success(res) {
|
||||||
if (res.statusCode === 204) {
|
if (res.statusCode === 204) {
|
||||||
let url = host + "/" + dir + filename + imgType;
|
let url = host + "/" + dir + filename + imgType;
|
||||||
common_vendor.index.__f__("log", "at pages/detail/detail.vue:1294", url);
|
common_vendor.index.__f__("log", "at pages/detail/detail.vue:1289", url);
|
||||||
imgList.value = [url];
|
imgList.value = [url];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
common_vendor.index.__f__("log", "at pages/detail/detail.vue:1299", err);
|
common_vendor.index.__f__("log", "at pages/detail/detail.vue:1294", err);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -400,8 +393,8 @@ const _sfc_main = {
|
|||||||
return "unknown";
|
return "unknown";
|
||||||
};
|
};
|
||||||
const afterRead = (file, lists, name) => {
|
const afterRead = (file, lists, name) => {
|
||||||
common_vendor.index.__f__("log", "at pages/detail/detail.vue:1318", lists);
|
common_vendor.index.__f__("log", "at pages/detail/detail.vue:1313", lists);
|
||||||
common_vendor.index.__f__("log", "at pages/detail/detail.vue:1319", name);
|
common_vendor.index.__f__("log", "at pages/detail/detail.vue:1314", name);
|
||||||
handleUpload(file);
|
handleUpload(file);
|
||||||
};
|
};
|
||||||
const delImg = (index) => {
|
const delImg = (index) => {
|
||||||
@ -675,7 +668,7 @@ const _sfc_main = {
|
|||||||
getExchangeDetail(id.value);
|
getExchangeDetail(id.value);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const readRecord = () => {
|
const readRecord = async () => {
|
||||||
let flag = 1;
|
let flag = 1;
|
||||||
if (type.value == "article") {
|
if (type.value == "article") {
|
||||||
flag = 1;
|
flag = 1;
|
||||||
@ -684,11 +677,19 @@ const _sfc_main = {
|
|||||||
} else {
|
} else {
|
||||||
flag = 3;
|
flag = 3;
|
||||||
}
|
}
|
||||||
api_api.api.readRecord({
|
const res = api_api.api.readRecord({
|
||||||
type: flag,
|
type: flag,
|
||||||
id: id.value
|
id: id.value
|
||||||
}).then((res) => {
|
|
||||||
});
|
});
|
||||||
|
if (res) {
|
||||||
|
if (type.value == "article") {
|
||||||
|
getArticleDetail(id.value);
|
||||||
|
} else if (type.value == "video") {
|
||||||
|
getVideoDetail(id.value);
|
||||||
|
} else {
|
||||||
|
getExchangeDetail(id.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
return (_ctx, _cache) => {
|
return (_ctx, _cache) => {
|
||||||
return common_vendor.e({
|
return common_vendor.e({
|
||||||
|
|||||||
@ -401,6 +401,8 @@
|
|||||||
margin: 0rpx 12rpx;
|
margin: 0rpx 12rpx;
|
||||||
}
|
}
|
||||||
.desc.data-v-eca06f3c {
|
.desc.data-v-eca06f3c {
|
||||||
|
width: 100%;
|
||||||
|
overflow-x: hidden;
|
||||||
padding-bottom: 80rpx;
|
padding-bottom: 80rpx;
|
||||||
}
|
}
|
||||||
.desc.data-v-eca06f3c .imgstyle {
|
.desc.data-v-eca06f3c .imgstyle {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user