Commit 1b8105b3 by xiongyuwen

no message

parent 1a576f26
......@@ -167,9 +167,10 @@ export default {
// 有值
const jwt = require("jsonwebtoken");
const wxUserid = jwt.decode(token).WxUserId;
// 更加微信用户id获取对应得用户信息并返回
axios
.get(`http://discuz.bailuntec.com/api/login?useid=${wxUserid}`)
.get(`http://discuz.bailuntec.com/api/login?useid=chenzekai`)
.then(res => {
if (res.data.data.relationships.users.data.id) {
localStorage.setItem(
......
......@@ -169,7 +169,6 @@
class="images"
@click.self="toDetail"
>
<!-- 888888 先演示给你看下到你了 -->
<el-image
v-for="(image, index) in item.firstPost.images.slice(0, 3)"
:key="index"
......
......@@ -234,7 +234,7 @@ export default {
},
addTextHideCover() {
if (!!this.article) {
if (!!this.article.attachments) {
if (!!this.article.attachments[0]) {
let filePath = this.article.attachments[0].filePath;
if (!!filePath) {
this.isShowView = true;
......
......@@ -5,6 +5,6 @@ export default {
DEV_API_URL: 'http://discuz.bailuntec.com',
// ssr api url
SSR_API_URL: 'http://discuz.bailuntec.com',
//WEI_PAN_URL: 'http://localhost:5008'
WEI_PAN_URL: 'http://pps.bailuntec.com/DiscuzApi'
WEI_PAN_URL: 'http://localhost:5008'
//WEI_PAN_URL: 'http://pps.bailuntec.com/DiscuzApi'
};
......@@ -31,12 +31,12 @@
</div>
</div>
<div v-if="total > 0" class="new-post">
<div class="new-post-cont">
<!-- <div class="new-post-cont">
{{ $t("home.hasNewContent", { total }) }}
<span class="refresh" @click="reloadThreadsList">{{
$t("home.clickRefresh")
}}</span>
</div>
</div> -->
</div>
<!-- <div class="post-list">
<template v-for="(item, index) in threadsData">
......
......@@ -31,12 +31,12 @@
</div>
</div>
<div v-if="total > 0" class="new-post">
<div class="new-post-cont">
<!-- <div class="new-post-cont">
{{ $t("home.hasNewContent", { total }) }}
<span class="refresh" @click="reloadThreadsList">{{
$t("home.clickRefresh")
}}</span>
</div>
</div> -->
</div>
<!-- <template v-for="(item, index) in threadsData">
<post-item v-if="item.type === 4"
......
......@@ -80,7 +80,7 @@ import config from "@/config.js";
export default {
data() {
return {
threadId: "1",
threadId: "999999999",
actions: [
{
text: this.$t("topic.read"),
......@@ -152,7 +152,6 @@ export default {
.then(res => {
// this.data = res.data.result;
this.data = this.deleteChildren(res.data.result);
console.log(this.data, "this.data");
this.loading = false;
if (this.data.length == 1) {
if (this.data[0].file) {
......@@ -160,7 +159,6 @@ export default {
this.handleNodeClick(this.data[0]);
}
}
console.log(this.data, 222);
});
// 监听滚动事件
// window.addEventListener("scroll", this.onScroll, false);
......@@ -190,11 +188,12 @@ export default {
window.open(this.fileSrc, "_blank");
},
handleNodeClick(data) {
self=this;
if (data.file) {
this.showViewloading = true;
axios
.get(
`${config.WEI_PAN_URL}/weipan/getviewfile?userId=${this.qywxUserid}&fileId=${data.id}&md5=${data.md5}&fileName=${data.label}`
`${config.WEI_PAN_URL}/weipan/GetFileInfo?fileId=${data.id}`
)
.then(res => {
// const ele = document.querySelector(".WACPageBorder");
......@@ -202,7 +201,7 @@ export default {
// console.log(ele, "ele");
this.showViewloading = false;
if (res.data) {
const filePath = res.data.result;
const filePath = res.data.result.qiniuUrl;
if (filePath) {
this.isShowView = true;
if (/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(filePath)) {
......@@ -218,6 +217,10 @@ export default {
this.fileSrc = `http://ow365.cn/?i=23468&furl=${filePath}`;
}
}
//获取fileid对应得threadId
let threadId=res.data.result.threadId;
this.threadId=threadId.toString();
console.log(this.threadId,3232);
}
this.fileMd5 = data.md5;
});
......
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