Commit 1fdf6d67 authored by 罗成兵's avatar 罗成兵

打包部署

parent 95fc1bde
NODE_ENV = dev NODE_ENV = dev
VUE_APP_BASE_URL2 = https://beta-ysservice.yiboshi.com VUE_APP_BASE_URL3 = https://beta-ysservice.yiboshi.com
VUE_APP_BASE_URL1 = https://ys-service.yiboshi.com VUE_APP_BASE_URL1 = https://ys-service.yiboshi.com
VUE_APP_BASE_URL1 = https://yyys-service.yiboshi.com VUE_APP_BASE_URL1 = https://yyys-service.yiboshi.com
VUE_APP_BASE_URL = http://127.0.0.1:8083 VUE_APP_BASE_URL = http://127.0.0.1:8083
......
NODE_ENV = yueyang NODE_ENV = yueyang
VUE_APP_BASE_URL = https://yyyesuan-service.yyjtzc.com VUE_APP_BASE_URL1 = https://yyyesuan-service.yyjtzc.com
VUE_APP_BASE_URL = http://59.230.237.90:8115
VUE_APP_BASE_PATH = https://beta-yac.yiboshi.com VUE_APP_BASE_PATH = https://beta-yac.yiboshi.com
VUE_APP_KEY_WORD = 'XwKsGlMcdPMEhR1B' VUE_APP_KEY_WORD = 'XwKsGlMcdPMEhR1B'
...@@ -13,7 +13,9 @@ ...@@ -13,7 +13,9 @@
"axios": "^0.19.2", "axios": "^0.19.2",
"compression-webpack-plugin": "5.0.0", "compression-webpack-plugin": "5.0.0",
"core-js": "^3.6.5", "core-js": "^3.6.5",
"crypto-js": "^4.1.1",
"http-parser-js": "^0.5.3", "http-parser-js": "^0.5.3",
"js-base64": "^3.7.2",
"jsonp": "^0.2.1", "jsonp": "^0.2.1",
"moment": "^2.29.1", "moment": "^2.29.1",
"moment-locales-webpack-plugin": "^1.2.0", "moment-locales-webpack-plugin": "^1.2.0",
......
...@@ -25,9 +25,9 @@ function fetch(url = '', params = {}, method = 'get', contentType = 'form', toke ...@@ -25,9 +25,9 @@ function fetch(url = '', params = {}, method = 'get', contentType = 'form', toke
for (let k in params) { for (let k in params) {
query.push(k + '=' + params[k]) query.push(k + '=' + params[k])
} }
let qs = query.join('&') let qs = query.join('&');
if (method.toLowerCase() === 'get' && query.length > 0) { if (method.toLowerCase() === 'get' && query.length > 0) {
url += (url.indexOf('?') < 0 ? '?' : '&') + qs url += (url.indexOf('?') < 0 ? '?' : '&') + qs;
} }
if (contentType !== 'application/x-www-form-urlencoded' && method !== 'get') { if (contentType !== 'application/x-www-form-urlencoded' && method !== 'get') {
qs = params qs = params
...@@ -44,8 +44,8 @@ function fetch(url = '', params = {}, method = 'get', contentType = 'form', toke ...@@ -44,8 +44,8 @@ function fetch(url = '', params = {}, method = 'get', contentType = 'form', toke
} }
}).then(function (response) { }).then(function (response) {
if (response.data.code === 'BIZ.TOKEN_EXPIRATION') { if (response.data.code === 'BIZ.TOKEN_EXPIRATION') {
console.log('没有token接口返回') console.log('没有token接口返回');
window.top.postMessage({messageType: "LOGOUT"}, '*') window.top.postMessage({messageType: "LOGOUT"}, '*');
return return
} }
if (response.data.code === 'BIZ.BUSSINESS_EXCEPTION') { if (response.data.code === 'BIZ.BUSSINESS_EXCEPTION') {
......
import Vue from 'vue' import Vue from 'vue'
import App from './App.vue' import App from './App.vue'
import router from './router' import router from './router/index'
import store from './store' import store from './store'
import 'ant-design-vue/dist/antd.less' import 'ant-design-vue/dist/antd.less'
// 引入antd // 引入antd
......
...@@ -2,23 +2,21 @@ ...@@ -2,23 +2,21 @@
<a-layout class="home_layout index_body" style="width: 100%"> <a-layout class="home_layout index_body" style="width: 100%">
<a-layout> <a-layout>
<a-layout-content class="layout_container" style="background: #fff"> <a-layout-content class="layout_container" style="background: #fff">
<div style="padding: 24px;"> <div style="padding: 10px;">
<!-- <a-tabs type="card" :tabBarGutter="10" v-model="$store.state.activeKeyInfo" @change="onChange"> <a-tabs type="card" :tabBarGutter="10" v-if="systemType" v-model="$store.state.activeKeyInfo" @change="onChange">
<a-tab-pane v-for="(item, index) in $store.state.tabsInfo" :key="item.frontActionUrl" > <a-tab-pane v-for="(item, index) in menuList" :key="item.frontActionUrl">
<span slot="tab"> <span slot="tab">
<span v-if="item.frontActionUrl != '/Home/distributionWarehousing' && item.frontActionUrl != '/Home/folviteApply'" <span>{{ item.name }}<span>(0)</span></span>
>{{item.name}}</span>
<span v-else>
<span v-if="item.frontActionUrl == '/Home/distributionWarehousing'">{{item.name}}<span>(0)</span></span>
<span v-if="item.frontActionUrl == '/Home/folviteApply'">{{item.name}}<span>(0)</span></span>
</span> </span>
&lt;!&ndash;<span>{{item.name}}</span>&ndash;&gt; </a-tab-pane>
</span> <a-tab-pane :key="111">
</a-tab-pane> <span slot="tab">
</a-tabs>--> <span>{{ unitInfo.unitName }}</span>
</span>
</a-tab-pane>
</a-tabs>
<router-view></router-view> <router-view></router-view>
</div> </div>
</a-layout-content> </a-layout-content>
<div style="clear: both"></div> <div style="clear: both"></div>
</a-layout> </a-layout>
...@@ -50,12 +48,13 @@ ...@@ -50,12 +48,13 @@
activeKey: '', activeKey: '',
showChildren: false, showChildren: false,
menuTest, menuTest,
unitInfo:{},
systemType: sessionStorage.getItem("systemType")
} }
}, },
created() { created() {
//获取妇幼权限和登录基本信息 //获取妇幼权限和登录基本信息
document.cookie = 'bGNnd3lwdF9hdA=1eb43b49-3b8f-4902-8616-dfe2283f1c03;'//昆明市 //document.cookie = 'bGNnd3lwdF9hdA=3168e52c-71ce-4218-9813-4df7dc4c2371;'
// document.cookie = 'bGNnd3lwdF9hdA=' + sessionStorage.getItem("loginToken") + ';'//云南省
let cookieToken = getCookie('bGNnd3lwdF9hdA'); let cookieToken = getCookie('bGNnd3lwdF9hdA');
console.log('tokenInfo',cookieToken) console.log('tokenInfo',cookieToken)
if (cookieToken) {//根据cookie获取token并调用接口获取菜单并设置初始选中菜单 if (cookieToken) {//根据cookie获取token并调用接口获取菜单并设置初始选中菜单
...@@ -64,6 +63,7 @@ ...@@ -64,6 +63,7 @@
let par = {menuId:query.menuId}; let par = {menuId:query.menuId};
console.log("query",query); console.log("query",query);
this.$api.fyManage.fetchFYLoginUser(par).then(({data}) => { this.$api.fyManage.fetchFYLoginUser(par).then(({data}) => {
this.unitInfo = data.unitInfo;
// window.sessionStorage.setItem('menuList', JSON.stringify(data.menuList)); // window.sessionStorage.setItem('menuList', JSON.stringify(data.menuList));
window.sessionStorage.setItem('userInfo', JSON.stringify(data.userInfo)); window.sessionStorage.setItem('userInfo', JSON.stringify(data.userInfo));
window.sessionStorage.setItem('allEnum', JSON.stringify(data.enumValueList)); window.sessionStorage.setItem('allEnum', JSON.stringify(data.enumValueList));
...@@ -72,55 +72,28 @@ ...@@ -72,55 +72,28 @@
this.showChildren = true this.showChildren = true
}) })
} else { } else {
console.log('没有token')
window.top.postMessage({messageType:"LOGOUT"}, '*')//给最顶层窗口发送token失效通知 window.top.postMessage({messageType:"LOGOUT"}, '*')//给最顶层窗口发送token失效通知
return
} }
}, },
methods: { methods: {
setInitMenuInfo() {//设置默认菜单和菜单缓存 setInitMenuInfo() {//设置默认菜单和菜单缓存
// this.menuList = JSON.parse(window.sessionStorage.getItem('menuList')); this.menuList = this.menuTest;
this.menuList = this.menuTest
/* if (!window.sessionStorage.getItem("tabs")) {
window.sessionStorage.setItem('tabs', JSON.stringify(this.menuTest));
this.$store.commit('changeTabs', this.menuTest)
this.tabs = this.$store.state.tabsInfo
}*/
/* if (!window.sessionStorage.getItem('activeItem')) {
window.sessionStorage.setItem('activeItem', '/Home/inStock')
}*/
/* if (!window.sessionStorage.getItem('activeKey')) {
let nowUrl = window.location.href
this.$router.push({path:nowUrl, query:{}})
this.$store.commit('changeActKey', '/Home/inStock')
}*/
/* const tabs = JSON.parse(window.sessionStorage.getItem('tabs'));
if (tabs) {
this.tabs = tabs;
this.$store.commit('changeTabs', tabs)
}
const activeKey = window.sessionStorage.getItem('activeItem');
if (activeKey) {
this.activeKey = activeKey;
this.$store.commit('changeActKey', activeKey)
}*/
}, },
// 点击tabs标签 // 点击tabs标签
// onChange(activeKey) { onChange(activeKey) {
// this.activeKey = activeKey; this.activeKey = activeKey;
// window.sessionStorage.setItem('activeKey', this.activeKey); window.sessionStorage.setItem('activeKey', this.activeKey);
// this.$store.commit('changeActKey', this.activeKey) this.$store.commit('changeActKey', this.activeKey)
// this.$store.state.tabsInfo.forEach((item, i) => { console.log( this.$store.state.tabsInfo);
// if (item.frontActionUrl === activeKey) { this.menuList.forEach((item, i) => {
// this.activeItem = [item.frontActionUrl]; console.log(item.frontActionUrl,item)
// window.sessionStorage.setItem('activeItem', this.activeItem); if (item.frontActionUrl === activeKey) {
// this.$router.push(item.frontActionUrl); this.activeItem = [item.frontActionUrl];
// } window.sessionStorage.setItem('activeItem', this.activeItem);
// }); this.$router.push(item.frontActionUrl);
// }, }
});
},
}, },
} }
</script> </script>
......
This diff is collapsed.
This diff is collapsed.
/*
import axios from 'axios'; import axios from 'axios';
import {Base64} from "js-base64"; import {Base64} from "js-base64";
...@@ -43,4 +43,4 @@ export const aesEncrypt = word => { ...@@ -43,4 +43,4 @@ export const aesEncrypt = word => {
var encrypted = CryptoJS.AES.encrypt(srcs, key, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 }); var encrypted = CryptoJS.AES.encrypt(srcs, key, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 });
return encrypted.toString(); return encrypted.toString();
} }
*/
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment