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

打包部署

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