提交 73872c33 authored 作者: 龙菲's avatar 龙菲

修复我的笔记和共享社区参数错误等问题

上级 1f95f6be
...@@ -172,9 +172,9 @@ const fileFunction = { ...@@ -172,9 +172,9 @@ const fileFunction = {
* 根据文件扩展名设置文件图片 * 根据文件扩展名设置文件图片
* @param {object} file 文件信息 * @param {object} file 文件信息
*/ */
setFileImg(file,key='extendName') { setFileImg(file, key = 'extendName') {
// debugger // debugger
console.log(file,key); console.log(file, key);
console.log(file[key]); console.log(file[key]);
if (file.isDir === 1) { if (file.isDir === 1) {
// 文件夹 // 文件夹
...@@ -326,42 +326,44 @@ const fileFunction = { ...@@ -326,42 +326,44 @@ const fileFunction = {
flag = true flag = true
} }
// 暂时写死---start // 暂时写死---start
let resolve = router.resolve({ // let resolve = router.resolve({
path: '/wpsReader', // path: '/wpsReader',
query: { // query: {
wpsUrl: `https://wwo.wps.cn/office/w/2c9a8083849eac7001849eae1df50001?_w_userid=1638778159578505218&_w_filrread=1&_w_filetype=db&_w_filepath=http://222.85.214.245:9559/ls/public/stream?randomCode=34df183096eb4996a93c3f779702e45d&_w_tokentype=1&_w_appid=1058dd766ec443c79f95933ec6a41169&_w_redirectkey=123456&_w_signature=E1OEcnnGEgVfK7mcnGDFgXJSLPY%3D`, // wpsUrl: `https://wwo.wps.cn/office/w/2c9a8083849eac7001849eae1df50001?_w_userid=1638778159578505218&_w_filrread=1&_w_filetype=db&_w_filepath=http://222.85.214.245:9559/ls/public/stream?randomCode=34df183096eb4996a93c3f779702e45d&_w_tokentype=1&_w_appid=1058dd766ec443c79f95933ec6a41169&_w_redirectkey=123456&_w_signature=E1OEcnnGEgVfK7mcnGDFgXJSLPY%3D`,
token: `0617753de96249a5a9839daf9b8ff8b5`, // token: `0617753de96249a5a9839daf9b8ff8b5`,
fileId // fileId
} // }
}) // })
window.open(resolve.href, '_blank') // window.open(resolve.href, '_blank')
// 暂时写死---end // 暂时写死---end
// 实际实现逻辑---start // 实际实现逻辑---start
// const params = { const params = {
// fileId: fileId, fileId: fileId || id,
// flag flag
// } }
// getViewUrlDbPath(params).then(res => { getViewUrlDbPath(params).then(res => {
// if (res.data) { if (res.data) {
// // console.log('res.data', res.data); // console.log('res.data', res.data);
// // 跳转 使用sessionStorage,避免关键信息在ip中暴露 // 跳转 使用sessionStorage,避免关键信息在ip中暴露
// // 使用push会停留当前页面,故不采纳 // 使用push会停留当前页面,故不采纳
// // params 传递参数,子组件无法渲染iframe组件,故不采纳 // params 传递参数,子组件无法渲染iframe组件,故不采纳
// localStorage.wpsUrl = res.data.wpsUrl localStorage.wpsUrl = res.data.wpsUrl
// localStorage.token = res.data.token localStorage.token = res.data.token
// let resolve = router.resolve({ let resolve = router.resolve({
// path: '/wpsReader', path: '/wpsReader',
// query: { query: {
// wpsUrl: res.data.wpsUrl, wpsUrl: res.data.wpsUrl,
// token: res.data.token token: res.data.token,
// } fileId
// })
// window.open(resolve.href, '_blank') }
// } })
// }) window.open(resolve.href, '_blank')
// return false }
})
return false
// 实际实现逻辑---end // 实际实现逻辑---end
......
...@@ -8,8 +8,8 @@ import { isRelogin } from '@/utils/request' ...@@ -8,8 +8,8 @@ import { isRelogin } from '@/utils/request'
NProgress.configure({ showSpinner: false }) NProgress.configure({ showSpinner: false })
// 暂时放开用来测试 // 暂时放开用来测试
const test = ['/home', '/mine/myCreate', '/mine/myTemplate', '/mine/myCollect', '/mine/myNote'] // const test = ['/home', '/mine/myCreate', '/mine/myTemplate', '/mine/myCollect', '/mine/myNote']
const whiteList = ['/login', '/register', ...test] const whiteList = ['/login', '/register']
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
NProgress.start() NProgress.start()
......
...@@ -143,7 +143,7 @@ export default { ...@@ -143,7 +143,7 @@ export default {
formData.append("tags", this.form.tagsArr.join(",")); formData.append("tags", this.form.tagsArr.join(","));
} else if (key == "id") { } else if (key == "id") {
// 只有id有值的时候才append // 只有id有值的时候才append
if (id != "") { if (this.form.id != "") {
formData.append("id", this.form.id); formData.append("id", this.form.id);
} }
} else { } else {
...@@ -158,7 +158,7 @@ export default { ...@@ -158,7 +158,7 @@ export default {
this.$emit("update"); this.$emit("update");
} }
// 清空表单项 // 清空表单项
this.$refs.form.resetFields() this.$refs.form.resetFields();
} }
}); });
}, },
......
...@@ -45,25 +45,16 @@ export default { ...@@ -45,25 +45,16 @@ export default {
}; };
}, },
computed: { computed: {
// ...mapGetters(["sidebar"]),
isSidebarOpen() { isSidebarOpen() {
return this.$store.state.app.sidebar.opened; return this.$store.state.app.sidebar.opened;
}, },
}, },
// watch:{
// 'sidebar.opened':{
// handler(value){
// this.isSidebarOpen =
// },
// immediate:true
// }
// },
mounted() { mounted() {
const { wpsUrl, token, fileId } = this.$route.query; const { wpsUrl, token, fileId } = this.$route.query;
this.routeParams = { wpsUrl, token, fileId }; this.routeParams = { wpsUrl, token, fileId };
console.log("this.routeParams", this.routeParams);
this.form.docId = fileId; this.form.docId = fileId;
this.initWps(wpsUrl, token); this.initWps(wpsUrl, token);
console.log("isSidebarOpen", this.isSidebarOpen);
}, },
destroyed() { destroyed() {
this.removeSelectionChangeListener(); this.removeSelectionChangeListener();
...@@ -75,6 +66,8 @@ export default { ...@@ -75,6 +66,8 @@ export default {
docId: this.routeParams.fileId, docId: this.routeParams.fileId,
docSType: "docx", //枚举值docx,pdf docSType: "docx", //枚举值docx,pdf
}; };
console.log("params", params);
return;
try { try {
let res = await addNearRead(params); let res = await addNearRead(params);
if (res.code == 200) { if (res.code == 200) {
......
...@@ -130,8 +130,9 @@ ...@@ -130,8 +130,9 @@
<script> <script>
import { getMyShareList, removeShare } from "@/api/user/share"; import { getMyShareList, removeShare } from "@/api/user/share";
import { shareStatusConstant } from "./constant"; import { shareStatusConstant, shareTypeConstant } from "./constant";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
const { PUBLIC_SHARE } = shareTypeConstant;
export default { export default {
name: "myShare", name: "myShare",
dicts: ["share_type", "share_status"], dicts: ["share_type", "share_status"],
...@@ -163,10 +164,13 @@ export default { ...@@ -163,10 +164,13 @@ export default {
pageCount: 10, pageCount: 10,
fileName: "", //文件名称 fileName: "", //文件名称
shareStatus: "", //分享状态 shareStatus: "", //分享状态
shareTo: "", //分享给谁 shareType: PUBLIC_SHARE,//查询分享给公共
// shareTo: "", //分享给谁
}, },
// 分享状态常量 // 分享状态常量
shareStatusConstant, shareStatusConstant,
// // 分享类别常量
// shareTypeConstant,
// 批量取消的弹窗可见性 // 批量取消的弹窗可见性
multiCancelVisible: false, multiCancelVisible: false,
selectedFiles: [], selectedFiles: [],
...@@ -196,8 +200,6 @@ export default { ...@@ -196,8 +200,6 @@ export default {
/** 查询字典类型列表 */ /** 查询字典类型列表 */
getList() { getList() {
this.loading = true; this.loading = true;
// 分享给我的
this.queryParams.shareTo = this.userInfo.userId;
getMyShareList(this.queryParams).then((res) => { getMyShareList(this.queryParams).then((res) => {
this.total = res.data.total; this.total = res.data.total;
this.loading = false; this.loading = false;
......
...@@ -35,7 +35,8 @@ module.exports = { ...@@ -35,7 +35,8 @@ module.exports = {
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
target: `http://222.85.214.245:9600`, target: `http://192.168.1.5:5236`,
// target: `http://222.85.214.245:9600`,
// target: `http://222.85.214.245:9558`, // target: `http://222.85.214.245:9558`,
// target: `http://172.24.100.246:9600`, // target: `http://172.24.100.246:9600`,
changeOrigin: true, changeOrigin: true,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论