Commit 1b8105b3 by xiongyuwen

no message

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