提交 db8715e5 authored 作者: jianglw's avatar jianglw

修改部分加密

上级 6af8b321
流水线 #103 已失败 于阶段
...@@ -276,8 +276,7 @@ ...@@ -276,8 +276,7 @@
function request_topology(setterTag, setteeTag) { function request_topology(setterTag, setteeTag) {
let params = {} let params = {}
console.log(GetQueryString("id")) params.id = GetQueryString("id");
params.id = decodeURIComponent(GetQueryString("id"));
params.setterTag = setterTag; params.setterTag = setterTag;
params.setteeTag = setteeTag; params.setteeTag = setteeTag;
axios({ axios({
......
...@@ -280,14 +280,13 @@ export default { ...@@ -280,14 +280,13 @@ export default {
this.$router.push({ this.$router.push({
path: this.previewUrl, path: this.previewUrl,
query: { query: {
id: encryption(String(row.id)), id: row.id,
}, },
}); });
}, },
async init() { async init() {
this.loading = true; this.loading = true;
await list(this.queryParams).then((res) => { await list(this.queryParams).then((res) => {
console.log(res)
this.topologyList = res.rows; this.topologyList = res.rows;
this.total = res.total; this.total = res.total;
}); });
...@@ -297,7 +296,7 @@ export default { ...@@ -297,7 +296,7 @@ export default {
this.$router.push({ this.$router.push({
path: this.editorUrl, path: this.editorUrl,
query: { query: {
id: encryption(String(row.id)), id: row.id,
}, },
}); });
}, },
......
...@@ -71,11 +71,8 @@ export default { ...@@ -71,11 +71,8 @@ export default {
// 3. 渲染图形 // 3. 渲染图形
// 画布图形数据,可以来自于官网下载的json // 画布图形数据,可以来自于官网下载的json
let id = this.$route.query.id; let id = this.$route.query.id;
if (decrypt(id) === null) {
id = this.$route.fullPath.split("id=")[1]; id = this.$route.fullPath.split("id=")[1];
console.log(decrypt(id)); await getTopologyId(id)
}
await getTopologyId(decrypt(id))
.then((res) => { .then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.topologyData = res.data.data; this.topologyData = res.data.data;
......
...@@ -446,8 +446,9 @@ export default { ...@@ -446,8 +446,9 @@ export default {
}); });
}, },
async open() { async open() {
if (this.$route.query.id) { if (this.$route.query.id) {
await getTopologyId(decrypt(this.$route.query.id)) await getTopologyId(this.$route.query.id)
.then((res) => { .then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.topologyData = res.data.data; this.topologyData = res.data.data;
...@@ -624,7 +625,7 @@ export default { ...@@ -624,7 +625,7 @@ export default {
async saveTopology() { async saveTopology() {
let params = {}; let params = {};
if (!!this.$route.query.id) { if (!!this.$route.query.id) {
params.id = decrypt(this.$route.query.id); params.id = this.$route.query.id;
} }
if (!this.canvas.data.name) { if (!this.canvas.data.name) {
this.$message.error("请填写图文名称"); this.$message.error("请填写图文名称");
...@@ -639,7 +640,7 @@ export default { ...@@ -639,7 +640,7 @@ export default {
this.$router.push({ this.$router.push({
path: this.$route.path, path: this.$route.path,
query: { query: {
id: encryption(String(res.data.id)), id: res.data.id,
}, },
}); });
} }
......
...@@ -10,7 +10,7 @@ module.exports = { ...@@ -10,7 +10,7 @@ module.exports = {
configureWebpack: { configureWebpack: {
name: name name: name
}, },
publicPath: process.env.NODE_ENV === "production" ? "/" : "/", publicPath: process.env.NODE_ENV === "production" ? "/topology" : "/",
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist) // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
outputDir: 'dist', outputDir: 'dist',
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下) // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论