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>
<a-tab-pane :key="111">
<span slot="tab">
<span>{{ unitInfo.unitName }}</span>
</span> </span>
</a-tab-pane> </a-tab-pane>
</a-tabs>--> </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>
......
...@@ -6,18 +6,13 @@ ...@@ -6,18 +6,13 @@
<a-tabs type="card" :tabBarGutter="10" v-model="$store.state.activeKeyInfo" @change="onChange"> <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"> <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>{{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> </span>
</a-tab-pane> </a-tab-pane>
<a-tab-pane :key="111"> <a-tab-pane :key="111">
<span slot="tab"> <span slot="tab">
<span>{{unitInfo.unitName}}</span> <span>{{ unitInfo.unitName }}</span>
</span> </span>
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
...@@ -30,18 +25,18 @@ ...@@ -30,18 +25,18 @@
</a-layout> </a-layout>
</template> </template>
<script> <script>
import {getCookie} from "./utils/common"; import {getCookie} from "./utils/common";
import {menuTest} from "./utils/testDate"; import {menuTest} from "./utils/testDate";
const unitTabs = [ const unitTabs = [
{ {
name: '在库管理', name: '在库管理',
key: '/Home/inStock', key: '/Home/inStock',
path: '/Home/inStock', path: '/Home/inStock',
parent: null, parent: null,
} }
] ]
export default { export default {
data() { data() {
return { return {
// 菜单 // 菜单
...@@ -123,11 +118,11 @@ ...@@ -123,11 +118,11 @@
}); });
}, },
}, },
} }
</script> </script>
<style lang="less"> <style lang="less">
.index_body { .index_body {
.ant-tabs-bar { .ant-tabs-bar {
border-bottom: 1px solid rgba(255, 77, 128, .2) !important; border-bottom: 1px solid rgba(255, 77, 128, .2) !important;
} }
...@@ -159,7 +154,7 @@ ...@@ -159,7 +154,7 @@
border-top-left-radius: 10px; border-top-left-radius: 10px;
border-top-right-radius: 10px; border-top-right-radius: 10px;
} }
} }
</style> </style>
<template> <template>
<div class="login_container"> <div class="login_container">
<!-- <div class="login_box"> <div class="login_box">
<div class="system_name">云南省叶酸发放服务平台</div> <div class="system_name">云南省叶酸发放服务平台</div>
<div class="login_context"> <div class="login_context">
<div class="left_img"> <div class="left_img">
...@@ -9,12 +8,12 @@ ...@@ -9,12 +8,12 @@
</div> </div>
<a-form-model :model="formData" :rules="formRules" class="login_form" ref="formRef"> <a-form-model :model="formData" :rules="formRules" class="login_form" ref="formRef">
<a-form-model-item prop="username"> <a-form-model-item prop="username">
&lt;!&ndash; <a-input placeholder="请输入用户名" v-model="formData.username" size="large" @keyup.enter="login">&ndash;&gt; <!-- <a-input placeholder="请输入用户名" v-model="formData.username" size="large" @keyup.enter="login">-->
&lt;!&ndash; <a-icon slot="prefix" type="user"/>&ndash;&gt; <!-- <a-icon slot="prefix" type="user"/>-->
&lt;!&ndash; </a-input>&ndash;&gt; <!-- </a-input>-->
<a-select v-model="formData.username" size="large" @change="userChange"> <a-select v-model="formData.username" size="large" @change="userChange">
<a-select-option v-for="(i,index) in userList" :key="i.userName" :value="index"> <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-option>
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
...@@ -48,78 +47,77 @@ ...@@ -48,78 +47,77 @@
</a-button> </a-button>
</a-form-model> </a-form-model>
</div> </div>
</div>--> </div>
</div> </div>
</template> </template>
<script> <script>
import Verify from "@/views/components/verifition/Verify"; import Verify from "@/views/components/verifition/Verify";
import {singleLogin, aesEncrypt} from "./utils/loginApi"; import {singleLogin, aesEncrypt} from "./utils/loginApi";
export default { export default {
// components: {Verify}, components: {Verify},
// data() { data() {
// return { return {
// userList: [], userList: [],
// formData: {}, formData: {},
// formRules: {}, formRules: {},
// captchaVerificationVis: true, captchaVerificationVis: true,
// captchaVerification: {}, captchaVerification: {},
// loading: false, 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;
// },
// },
} }
},
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> </script>
<style lang="less" scoped> <style lang="less" scoped>
.login_container { .login_container {
background-image: url("../../static/images/bg.jpg"); background-image: url("../../static/images/bg.jpg");
background-size: 100% 100%; background-size: 100% 100%;
height: 100%; height: 100%;
...@@ -155,7 +153,7 @@ ...@@ -155,7 +153,7 @@
height: 400px; height: 400px;
padding: 0 80px; padding: 0 80px;
} }
} }
</style> </style>
--> -->
--> -->
/*
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 source diff could not be displayed because it is too large. You can view the blob instead.
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