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

修改部分加密

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