upd: 更新上线文案输出

master
shuxiaokai 3 years ago
parent 2b57eb2701
commit b94c71b85a

@ -1,6 +1,6 @@
{
"name": "moyu",
"version": "0.2.0",
"version": "0.8.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",

@ -14,6 +14,7 @@
import { defineComponent } from "vue"
import { ElConfigProvider } from "element-plus"
import zhCn from "element-plus/lib/locale/lang/zh-cn"
import config from "@/../config/config"
export default defineComponent({
components: {
@ -24,7 +25,25 @@ export default defineComponent({
locale: zhCn,
};
},
methods: {
created() {
if (!config.isDev) {
console.log(`
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/ _ \\ / _ \\ / _ _ _ _ _ _ \\ \\ \\ / / | | | |
/ / \\ \\ / / \\ \\ / / \\ \\ \\ \\ / / | | | |
/ / \\ \\ / / \\ \\ | | | | \\ / / | | | |
/ / \\ \\ / / \\ \\ | | | | \\ / / | | | |
/ / \\ \\ / / \\ \\ \\ \\_ _ _ _ _ _/ / / / \\ _|_ _ _ _| _/
/_/ \\_\\/_/ \\_\\ \\_ _ _ _ _ _ _/ /_ _/ \\ _ _ _ _ _ /
基于Vue和Electron的接口文档工具
GitHub地址https://github.com/trueleaf/moyu
Gitee地址https://gitee.com/shuzhikai/moyu
`)
console.log(process.env.VUE_APP_BUILD_TIME);
}
},
})
</script>

@ -17,6 +17,9 @@ const axiosPlugin = {
const userInfoStr = localStorage.getItem("userInfo") || "{}";
try {
const userInfo = JSON.parse(userInfoStr);
if (!userInfo.token) {
router.push("/login");
}
reqConfig.headers.Authorization = userInfo.token
} catch (error) {
Promise.reject(error)

Loading…
Cancel
Save