Commit e02149ae by xiongyuwen
parents fadce8c0 4ac24e66
......@@ -59,8 +59,8 @@
<div class="list-top-item">
<a href="#" class="top-title">
百伦论坛知识库
<div></div
></a>
<div
/></a>
<div />
</div>
<attachment-list
......@@ -85,7 +85,7 @@
thread.paidUsers || [],
thread.rewardedUsers || [],
article.likedUsers || [],
[],
[]
]"
@payOrReward="showCheckoutCounter = true"
/>
......@@ -130,7 +130,7 @@ export default {
data: [],
defaultProps: {
children: "children",
label: "label",
label: "label"
},
list: [],
thread: {},
......@@ -143,7 +143,7 @@ export default {
count: 0,
command: "",
canOpera: false,
icon: "book",
icon: "book"
},
{
text: this.$t("topic.getLike"),
......@@ -151,21 +151,21 @@ export default {
command: "isLiked",
canOpera: true,
isStatus: false,
icon: "like",
icon: "like"
},
{
text: this.$t("topic.collection"),
command: "isFavorite",
canOpera: true,
isStatus: false,
icon: "favor",
icon: "favor"
},
{
text: this.$t("topic.share"),
command: "showLink",
canOpera: true,
icon: "link",
},
icon: "link"
}
],
paidInformation: {
price: "0",
......@@ -173,7 +173,7 @@ export default {
paidUsers: [],
paidCount: 0,
isPaidAttachment: false,
attachmentPrice: "0",
attachmentPrice: "0"
},
payment: { wechat_qrcode: "", rewardAmount: "" },
location: { location: "", latitude: "", longitude: "" },
......@@ -184,7 +184,7 @@ export default {
isStatus: false,
canOpera: false,
text: this.$t("topic.edit"),
type: "0",
type: "0"
},
{
name: "canEssence",
......@@ -192,7 +192,7 @@ export default {
isStatus: false,
canOpera: false,
text: this.$t("topic.essence"),
type: "1",
type: "1"
},
{
name: "canSticky",
......@@ -200,7 +200,7 @@ export default {
isStatus: false,
canOpera: false,
text: this.$t("topic.sticky"),
type: "2",
type: "2"
},
{
name: "canHide",
......@@ -208,8 +208,8 @@ export default {
isStatus: false,
canOpera: false,
text: this.$t("topic.delete"),
type: "3",
},
type: "3"
}
],
showCheckoutCounter: false,
showPasswordInput: false,
......@@ -234,11 +234,11 @@ export default {
thumbUrl: "",
type: 0,
type_id: 118,
url: "",
url: ""
},
isPaid: false,
isPaidAttachment: false,
price: "0.00",
price: "0.00"
};
},
computed: {
......@@ -294,7 +294,7 @@ export default {
} else {
return 2;
}
},
}
},
created() {
this.fileSrc = "";
......@@ -311,7 +311,7 @@ export default {
const fatherid = this.$route.query.fatherid;
const appointfileid = this.$route.query.appointfileid;
const firstfileid = this.$route.query.firstfileid;
if (!!appointfileid) {
if (appointfileid) {
fildId = firstfileid;
}
// 获取树状数据
......@@ -319,24 +319,24 @@ export default {
.get(
`${config.WEI_PAN_URL}/weipan/getfilelisttree?userId=${qywxUserid}&fildId=${fildId}&fatherid=${fatherid}`
)
.then((res) => {
.then(res => {
// this.data = res.data.result;
this.data = this.deleteChildren(res.data.result);
this.loading = false;
if (!!this.data) {
if (!!appointfileid) {
if (this.data) {
if (appointfileid) {
axios
.get(
`${config.WEI_PAN_URL}/weipan/getfilelisttree?userId=${qywxUserid}&fildId=${appointfileid}`
)
.then((res) => {
let file = res.data.result;
.then(res => {
const file = res.data.result;
// 触发点击事件
this.handleNodeClick(file[0]);
});
} else {
let file = this.data.filter((item) => item.file == true);
if (!!file) {
const file = this.data.filter(item => item.file == true);
if (file) {
// 触发点击事件
this.handleNodeClick(file[0]);
}
......@@ -385,12 +385,12 @@ export default {
.get(
`${config.WEI_PAN_URL}/weipan/GetAttchmattachmentByFileId?fileId=${data.id}`
)
.then((res) => {
.then(res => {
this.attachmentFile = res.data.result;
});
axios
.get(`${config.WEI_PAN_URL}/weipan/GetFileInfo?fileId=${data.id}`)
.then((res) => {
.then(res => {
// const ele = document.querySelector(".WACPageBorder");
// ele.style.border = "none";
// console.log(ele, "ele");
......@@ -429,10 +429,10 @@ export default {
return this.$store
.dispatch("jv/get", [
`threads/${this.threadId}`,
{ params: { include: threadInclude } },
{ params: { include: threadInclude } }
])
.then(
(data) => {
data => {
if (data.isDeleted) return this.$router.replace("/error");
this.articleLoading = false;
this.thread = data;
......@@ -440,7 +440,7 @@ export default {
this.postId = this.article._jv.id;
this.initData();
},
(e) => this.handleError(e, "thread")
e => this.handleError(e, "thread")
);
},
initData() {
......@@ -461,7 +461,7 @@ export default {
this.article.images.length > 0
) {
this.article.images = this.article.images.filter(
(image) => this.article.contentAttachIds.indexOf(image._jv.id) < 0
image => this.article.contentAttachIds.indexOf(image._jv.id) < 0
);
}
},
......@@ -480,7 +480,7 @@ export default {
}
},
initManagementList(data) {
this.managementList.forEach((item) => {
this.managementList.forEach(item => {
item.canOpera = data[item.name];
if (item.name === "canEssence") {
item.isStatus = data.isEssence;
......@@ -496,15 +496,15 @@ export default {
});
if (
(this.thread.type === 4 || this.thread.type === 5) &&
this.managementList.filter((item) => item.name === "canEdit").length > 0
this.managementList.filter(item => item.name === "canEdit").length > 0
) {
// 语音贴和问答帖,不支持编辑
this.managementList.filter(
(item) => item.name === "canEdit"
item => item.name === "canEdit"
)[0].canOpera = false;
}
this.thread.isEssence = data.isEssence;
this.managementList = this.managementList.filter((item) => item.canOpera);
this.managementList = this.managementList.filter(item => item.canOpera);
},
initActions(data, firstPost) {
const viewInfo = { ...this.actions[0] };
......@@ -564,7 +564,7 @@ export default {
)
.then(() => {
this.payOrder().then(
(wechatQrcode) => {
wechatQrcode => {
this.payment.wechat_qrcode = wechatQrcode;
this.wxPayActive().then(
() => {
......@@ -600,7 +600,7 @@ export default {
return this.$store
.dispatch("jv/patch", params)
.then(
(data) => {
data => {
data.firstPost && this.initManagementList(data);
data.firstPost && this.initActions(data);
if (item.command === "isSticky") {
......@@ -613,7 +613,7 @@ export default {
}
if (item.command === "isDeleted") return this.afterDeleted();
},
(e) => this.handleError(e)
e => this.handleError(e)
)
.finally(() => {
this.defaultLoading = false;
......@@ -630,12 +630,12 @@ export default {
afterDeleted() {
this.$message({
typeInformation: "success",
message: this.$t("topic.deleteSuccessAndJumpToBack"),
message: this.$t("topic.deleteSuccessAndJumpToBack")
});
setTimeout(() => {
this.$router.push("/");
}, 1000);
},
}
},
head() {
return {
......@@ -644,7 +644,7 @@ export default {
{
hid: "keywords",
name: "keywords",
content: (this.thread.category && this.thread.category.name) || "",
content: (this.thread.category && this.thread.category.name) || ""
},
{
hid: "description",
......@@ -652,20 +652,19 @@ export default {
content:
(this.thread.firstPost &&
this.thread.firstPost.summaryText.slice(0, 80)) ||
"",
""
},
{
name: "og:video",
content:
(this.thread.threadVideo && this.thread.threadVideo.media_url) ||
"",
},
],
(this.thread.threadVideo && this.thread.threadVideo.media_url) || ""
}
]
};
},
textChange() {
alert(332);
},
}
// },
// destroy() {
......@@ -681,7 +680,9 @@ export default {
width: 200px;
overflow: hidden;
} */
.el-image__inner{object-fit:fill !important}
.el-image__inner {
object-fit: fill !important;
}
.detail-content-left-text
.el-tree--highlight-current
.el-tree-node.is-current
......@@ -700,7 +701,9 @@ export default {
}
</style>
<style lang="scss" scoped>
.el-image__inner{object-fit:fill !important}
.el-image__inner {
object-fit: fill !important;
}
@import "@/assets/css/variable/color.scss";
.iframe-box {
position: relative;
......@@ -716,7 +719,9 @@ export default {
z-index: 99;
}
.detail {
width: 100%;
&-content {
width: 100%;
display: flex;
justify-content: space-between;
&-left {
......@@ -733,7 +738,7 @@ export default {
line-height: 17px;
}
&-custom {
width: 150px;
width: 100px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
......
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