02899b44 by renchao@pashanhoo.com

style:titile和登录

1 parent a383b8db
{
"TITLE": "汉中市数据上报系统",
"THEME": "sb",
"LOGIN": "sb",
"CODE": "BDCSBPT",
"THEME": "jg",
"LOGIN": "jg",
"CODE": "BDCJGPT",
"AREARMAP": "610702",
"SERVERAPI": "/bdcsjsb",
"calcHeight": 160,
......
<!--
* @Description: 引入配置文件
* @Autor: renchao
* @LastEditTime: 2023-03-15 17:16:18
* @LastEditTime: 2023-04-06 14:06:07
-->
<!DOCTYPE html>
<html>
......@@ -25,6 +25,7 @@
</html>
<script>
console.log(webpackConfig.name, 'webpackConfig.name');
window.baseUrl = location.origin || location.protocol + '//' + location.host
window.timeout = 5000
window.authorization = "bearer AT-4-MxSrO29Coe7VTazx8uuixtqqgO-hvCB6"
......
......@@ -2,7 +2,7 @@
* @Author: yangwei
* @Date: 2023-01-16 09:10:12
* @LastEditors: Please set LastEditors
* @LastEditTime: 2023-03-27 16:54:34
* @LastEditTime: 2023-04-06 14:12:53
* @FilePath: \bdcjg-web\src\main.js
* @Description:
*
......@@ -60,6 +60,7 @@ axios.get("./config.json")
.then((res) => {
Vue.prototype.BASE_API = res.data
localStorage.setItem('ApiUrl', JSON.stringify(res.data));
window.TITLE = res.data.TITLE
require('./permission')
new Vue({
el: '#app',
......
/*
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-03-15 11:08:56
* @LastEditTime: 2023-04-06 11:26:31
*/
module.exports = {
title: '数据上报系统',
/**
* @type {boolean} true | false
* @description Whether show the settings right-panel
......
......@@ -63,6 +63,8 @@ export default {
localStorage.setItem("token", `Bearer ${res.content}`);
//登录成功后需判断有无重定向,没有重定向则跳转首页
this.$router.replace(this.$route.query.redirect || "/home");
} else {
this.$message.error(res.message);
}
}
})
......
......@@ -122,6 +122,8 @@ export default {
{ path: "*", redirect: "/404", hidden: true },
]);
this.$router.replace(this.$route.query.redirect || path1);
} else {
this.$message.error(res.message);
}
}
})
......
'use strict'
const path = require('path')
const defaultSettings = require('./src/settings.js')
function resolve (dir) {
return path.join(__dirname, dir)
}
const name = defaultSettings.title
const name = process.env.TITLE
const port = process.env.port || process.env.npm_config_port || 8888 // dev port
// All configuration item explanations can be find in https://cli.vuejs.org/config/
module.exports = {
......