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;
</a-tab-pane>
<a-tab-pane :key="111">
<span slot="tab">
<span>{{ unitInfo.unitName }}</span>
</span>
</a-tab-pane>
</a-tabs>-->
</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>
......
......@@ -6,18 +6,13 @@
<a-tabs type="card" :tabBarGutter="10" 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>{{item.name}}<span>(0)</span></span>
<!-- <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>
</a-tab-pane>
<a-tab-pane :key="111">
<span slot="tab">
<span>{{unitInfo.unitName}}</span>
<span>{{ unitInfo.unitName }}</span>
</span>
</a-tab-pane>
</a-tabs>
......@@ -30,18 +25,18 @@
</a-layout>
</template>
<script>
import {getCookie} from "./utils/common";
import {menuTest} from "./utils/testDate";
import {getCookie} from "./utils/common";
import {menuTest} from "./utils/testDate";
const unitTabs = [
const unitTabs = [
{
name: '在库管理',
key: '/Home/inStock',
path: '/Home/inStock',
parent: null,
}
]
export default {
]
export default {
data() {
return {
// 菜单
......@@ -123,11 +118,11 @@
});
},
},
}
}
</script>
<style lang="less">
.index_body {
.index_body {
.ant-tabs-bar {
border-bottom: 1px solid rgba(255, 77, 128, .2) !important;
}
......@@ -159,7 +154,7 @@
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
}
}
</style>
<template>
<div class="login_container">
<!-- <div class="login_box">
<div class="login_box">
<div class="system_name">云南省叶酸发放服务平台</div>
<div class="login_context">
<div class="left_img">
......@@ -9,12 +8,12 @@
</div>
<a-form-model :model="formData" :rules="formRules" class="login_form" ref="formRef">
<a-form-model-item prop="username">
&lt;!&ndash; <a-input placeholder="请输入用户名" v-model="formData.username" size="large" @keyup.enter="login">&ndash;&gt;
&lt;!&ndash; <a-icon slot="prefix" type="user"/>&ndash;&gt;
&lt;!&ndash; </a-input>&ndash;&gt;
<!-- <a-input placeholder="请输入用户名" v-model="formData.username" size="large" @keyup.enter="login">-->
<!-- <a-icon slot="prefix" type="user"/>-->
<!-- </a-input>-->
<a-select v-model="formData.username" size="large" @change="userChange">
<a-select-option v-for="(i,index) in userList" :key="i.userName" :value="index">
{{i.unitName+"("+i.userName+")"}}
{{ i.unitName + "(" + i.userName + ")" }}
</a-select-option>
</a-select>
</a-form-model-item>
......@@ -48,78 +47,77 @@
</a-button>
</a-form-model>
</div>
</div>-->
</div>
</div>
</template>
<script>
import Verify from "@/views/components/verifition/Verify";
import {singleLogin, aesEncrypt} from "./utils/loginApi";
import Verify from "@/views/components/verifition/Verify";
import {singleLogin, aesEncrypt} from "./utils/loginApi";
export default {
// components: {Verify},
// data() {
// return {
// userList: [],
// formData: {},
// formRules: {},
// captchaVerificationVis: true,
// captchaVerification: {},
// loading: false,
// }
// },
// created() {
// let unitNames = ["云南省妇幼保健院","云南省妇幼保健院(供应商管理)","昆明市妇幼保健院", "五华区妇幼保健院", "五华区普吉大普吉社区卫生服务中心",
// "五华区普吉新村社区卫生服务站", "五华区普吉林家院社区卫生服务站", "五华区大观社区卫生服务中心", "五华区护国南通街社区卫生服务站",
// "五华区大观新闻里社区卫生服务中心","医博士妇幼保健院"];
// let userNames = ["3163915418", "3104754897","3458022605", "4040050358", "0892676849", "7381485204", "4681975615",-
// "0580382354", "2409311755", "7531945226","330781198509074950"];
// let passwords = ["ynfy2021","075546","078730", "073657", "07473X", "072179", "074991", "076479", "079813", "076831","ybs1234"];
// unitNames.forEach((x, index) => {
// this.userList.push({unitName: x, userName: userNames[index], password: passwords[index]});
// })
// },
// methods: {
// userChange(value) {
// this.formData.username = this.userList[value].userName;
// this.formData.password = this.userList[value].password;
// },
// login() {
// this.loading = true;
// let fromData = new FormData();
// // fromData.append("username", aesEncrypt("9028584165"));
// // fromData.append("password", aesEncrypt("074332"));
// fromData.append("username", aesEncrypt(this.formData.username));
// fromData.append("password", aesEncrypt(this.formData.password));
// fromData.append(
// "captchaVerification",
// this.captchaVerification.captchaVerification
// );
// singleLogin(fromData).then(res => {
// if (res.data.code === "SUCCESS") {
// sessionStorage.setItem('token', "bearer " + res.data.data.token);
// this.$router.push('/Home');
// this.$message.success(res.data.msg)
// } else {
// this.$message.error(res.data.msg)
// }
// this.loading = false;
// }).catch(res => {
// this.loading = false;
// });
// },
// toNetwork() {
// this.$router.push('/networkPortLogin')
// },
// // 验证成功
// success(params) {
// this.captchaVerification = params;
// this.captchaVerificationVis = true;
// },
// },
export default {
components: {Verify},
data() {
return {
userList: [],
formData: {},
formRules: {},
captchaVerificationVis: true,
captchaVerification: {},
loading: false,
}
},
created() {
let unitNames = ["云南省妇幼保健院", "云南省妇幼保健院(供应商管理)", "昆明市妇幼保健院", "五华区妇幼保健院", "五华区普吉大普吉社区卫生服务中心",
"五华区普吉新村社区卫生服务站", "五华区普吉林家院社区卫生服务站", "五华区大观社区卫生服务中心", "五华区护国南通街社区卫生服务站",
"五华区大观新闻里社区卫生服务中心", "医博士妇幼保健院"];
let userNames = ["3163915418", "3104754897", "3458022605", "4040050358", "0892676849", "7381485204", "4681975615", -
"0580382354", "2409311755", "7531945226", "330781198509074950"];
let passwords = ["ynfy2021", "075546", "078730", "073657", "07473X", "072179", "074991", "076479", "079813", "076831", "ybs1234"];
unitNames.forEach((x, index) => {
this.userList.push({unitName: x, userName: userNames[index], password: passwords[index]});
})
},
methods: {
userChange(value) {
this.formData.username = this.userList[value].userName;
this.formData.password = this.userList[value].password;
},
login() {
this.loading = true;
let fromData = new FormData();
fromData.append("username", aesEncrypt(this.formData.username));
fromData.append("password", aesEncrypt(this.formData.password));
fromData.append(
"captchaVerification",
this.captchaVerification.captchaVerification
);
singleLogin(fromData).then(res => {
if (res.data.code === "SUCCESS") {
document.cookie = 'bGNnd3lwdF9hdA=' + res.data.data.token + ';'
sessionStorage.setItem("systemType",1);
this.$router.push('/Home/inStock');
this.$message.success(res.data.msg)
} else {
this.$message.error(res.data.msg)
}
this.loading = false;
}).catch(res => {
this.loading = false;
});
},
toNetwork() {
this.$router.push('/networkPortLogin')
},
// 验证成功
success(params) {
this.captchaVerification = params;
this.captchaVerificationVis = true;
},
},
}
</script>
<style lang="less" scoped>
.login_container {
.login_container {
background-image: url("../../static/images/bg.jpg");
background-size: 100% 100%;
height: 100%;
......@@ -155,7 +153,7 @@
height: 400px;
padding: 0 80px;
}
}
}
</style>
-->
-->
/*
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