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>
......
...@@ -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,136 +25,136 @@ ...@@ -30,136 +25,136 @@
</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 {
data() {
return {
// 菜单
menuList: [],
// 选中的菜单
activeItem: [],
// tabs标签
tabs: [],
// 选中的tabs标签
activeKey: '',
showChildren: false,
menuTest,
unitInfo: {}
} }
] },
export default { created() {
data() { document.cookie = 'bGNnd3lwdF9hdA=' + sessionStorage.getItem("token") + ';'//云南省
return { let cookieToken = getCookie('bGNnd3lwdF9hdA');
// 菜单 cookieToken = sessionStorage.getItem("token");
menuList: [], this.menuList = menuTest;
// 选中的菜单 if (cookieToken) {
activeItem: [], let par = {}
// tabs标签 this.$api.fyManage.fetchFYLoginUser(par).then(({data}) => {
tabs: [], this.unitInfo = data.unitInfo;
// 选中的tabs标签 window.sessionStorage.setItem('menuList', JSON.stringify(this.menuList));
activeKey: '', window.sessionStorage.setItem('userInfo', JSON.stringify(data.userInfo));
showChildren: false, window.sessionStorage.setItem('unitInfo', JSON.stringify(data.unitInfo));
menuTest, window.sessionStorage.setItem('allEnum', JSON.stringify(data.enumValueList));
unitInfo: {} this.setInitMenuInfo()
} this.showChildren = true
}, })
created() { } else {
document.cookie = 'bGNnd3lwdF9hdA=' + sessionStorage.getItem("token") + ';'//云南省 console.log('没有token11')
let cookieToken = getCookie('bGNnd3lwdF9hdA'); window.top.postMessage({messageType: "LOGOUT"}, '*')//给最顶层窗口发送token失效通知
cookieToken = sessionStorage.getItem("token"); return
}
},
methods: {
setInitMenuInfo() {//设置默认菜单和菜单缓存
this.menuList = menuTest; this.menuList = menuTest;
if (cookieToken) { this.menuList = this.menuTest
let par = {} if (!window.sessionStorage.getItem("tabs")) {
this.$api.fyManage.fetchFYLoginUser(par).then(({data}) => { window.sessionStorage.setItem('tabs', JSON.stringify(this.menuTest));
this.unitInfo = data.unitInfo; this.$store.commit('changeTabs', this.menuTest)
window.sessionStorage.setItem('menuList', JSON.stringify(this.menuList)); this.tabs = this.$store.state.tabsInfo
window.sessionStorage.setItem('userInfo', JSON.stringify(data.userInfo)); }
window.sessionStorage.setItem('unitInfo', JSON.stringify(data.unitInfo)); if (!window.sessionStorage.getItem('activeItem')) {
window.sessionStorage.setItem('allEnum', JSON.stringify(data.enumValueList)); window.sessionStorage.setItem('activeItem', '/Home/inStock')
this.setInitMenuInfo() }
this.showChildren = true // if (!window.sessionStorage.getItem('activeKey')) {
}) // let nowUrl = window.location.href;
} else { // this.$router.push({path: nowUrl, query: {}})
console.log('没有token11') // this.$store.commit('changeActKey', '/Home/inStock')
window.top.postMessage({messageType: "LOGOUT"}, '*')//给最顶层窗口发送token失效通知 // }
return 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)
} }
},
methods: {
setInitMenuInfo() {//设置默认菜单和菜单缓存
this.menuList = 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) => { this.$store.state.tabsInfo.forEach((item, i) => {
if (item.frontActionUrl === activeKey) { if (item.frontActionUrl === activeKey) {
this.activeItem = [item.frontActionUrl]; this.activeItem = [item.frontActionUrl];
window.sessionStorage.setItem('activeItem', this.activeItem); window.sessionStorage.setItem('activeItem', this.activeItem);
this.$router.push(item.frontActionUrl); this.$router.push(item.frontActionUrl);
} }
}); });
},
}, },
} },
}
</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;
} }
.ant-tabs-nav-scroll { .ant-tabs-nav-scroll {
margin-left: 0px !important; margin-left: 0px !important;
} }
.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-nav-container { .ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-nav-container {
height: 35px !important; height: 35px !important;
} }
.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab { .ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab {
height: 35px !important; height: 35px !important;
color: #F8F8FF !important; color: #F8F8FF !important;
line-height: 35px !important; line-height: 35px !important;
background: rgba(255, 77, 128, .5); background: rgba(255, 77, 128, .5);
border-bottom: 0px solid #FF4D80; border-bottom: 0px solid #FF4D80;
border-top-left-radius: 10px; border-top-left-radius: 10px;
border-top-right-radius: 10px; border-top-right-radius: 10px;
} }
.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active { .ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active {
height: 35px !important; height: 35px !important;
color: #fff; color: #fff;
background: #FF4D80; background: #FF4D80;
border-color: #FF4D80; border-color: #FF4D80;
border-bottom: 0px solid #FF4D80; border-bottom: 0px solid #FF4D80;
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>
...@@ -40,122 +39,121 @@ ...@@ -40,122 +39,121 @@
<a-alert <a-alert
message="验证通过" message="验证通过"
type="success" type="success"
show-icon show-icon
/> />
</a-form-model-item> </a-form-model-item>
<a-button @click="login" type="primary" block size="large" :disabled="!captchaVerificationVis" <a-button @click="login" type="primary" block size="large" :disabled="!captchaVerificationVis"
:loading="loading" @keyup.enter="login">登录 :loading="loading" @keyup.enter="login">登录
</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() { created() {
// let unitNames = ["云南省妇幼保健院","云南省妇幼保健院(供应商管理)","昆明市妇幼保健院", "五华区妇幼保健院", "五华区普吉大普吉社区卫生服务中心", let unitNames = ["云南省妇幼保健院", "云南省妇幼保健院(供应商管理)", "昆明市妇幼保健院", "五华区妇幼保健院", "五华区普吉大普吉社区卫生服务中心",
// "五华区普吉新村社区卫生服务站", "五华区普吉林家院社区卫生服务站", "五华区大观社区卫生服务中心", "五华区护国南通街社区卫生服务站", "五华区普吉新村社区卫生服务站", "五华区普吉林家院社区卫生服务站", "五华区大观社区卫生服务中心", "五华区护国南通街社区卫生服务站",
// "五华区大观新闻里社区卫生服务中心","医博士妇幼保健院"]; "五华区大观新闻里社区卫生服务中心", "医博士妇幼保健院"];
// let userNames = ["3163915418", "3104754897","3458022605", "4040050358", "0892676849", "7381485204", "4681975615",- let userNames = ["3163915418", "3104754897", "3458022605", "4040050358", "0892676849", "7381485204", "4681975615", -
// "0580382354", "2409311755", "7531945226","330781198509074950"]; "0580382354", "2409311755", "7531945226", "330781198509074950"];
// let passwords = ["ynfy2021","075546","078730", "073657", "07473X", "072179", "074991", "076479", "079813", "076831","ybs1234"]; let passwords = ["ynfy2021", "075546", "078730", "073657", "07473X", "072179", "074991", "076479", "079813", "076831", "ybs1234"];
// unitNames.forEach((x, index) => { unitNames.forEach((x, index) => {
// this.userList.push({unitName: x, userName: userNames[index], password: passwords[index]}); this.userList.push({unitName: x, userName: userNames[index], password: passwords[index]});
// }) })
// }, },
// methods: { methods: {
// userChange(value) { userChange(value) {
// this.formData.username = this.userList[value].userName; this.formData.username = this.userList[value].userName;
// this.formData.password = this.userList[value].password; this.formData.password = this.userList[value].password;
// }, },
// login() { login() {
// this.loading = true; this.loading = true;
// let fromData = new FormData(); let fromData = new FormData();
// // fromData.append("username", aesEncrypt("9028584165")); fromData.append("username", aesEncrypt(this.formData.username));
// // fromData.append("password", aesEncrypt("074332")); fromData.append("password", aesEncrypt(this.formData.password));
// fromData.append("username", aesEncrypt(this.formData.username)); fromData.append(
// fromData.append("password", aesEncrypt(this.formData.password)); "captchaVerification",
// fromData.append( this.captchaVerification.captchaVerification
// "captchaVerification", );
// this.captchaVerification.captchaVerification singleLogin(fromData).then(res => {
// ); if (res.data.code === "SUCCESS") {
// singleLogin(fromData).then(res => { document.cookie = 'bGNnd3lwdF9hdA=' + res.data.data.token + ';'
// if (res.data.code === "SUCCESS") { sessionStorage.setItem("systemType",1);
// sessionStorage.setItem('token', "bearer " + res.data.data.token); this.$router.push('/Home/inStock');
// this.$router.push('/Home'); this.$message.success(res.data.msg)
// this.$message.success(res.data.msg) } else {
// } else { this.$message.error(res.data.msg)
// this.$message.error(res.data.msg) }
// } this.loading = false;
// this.loading = false; }).catch(res => {
// }).catch(res => { this.loading = false;
// this.loading = false; });
// }); },
// }, toNetwork() {
// toNetwork() { this.$router.push('/networkPortLogin')
// this.$router.push('/networkPortLogin') },
// }, // 验证成功
// // 验证成功 success(params) {
// success(params) { this.captchaVerification = params;
// this.captchaVerification = params; this.captchaVerificationVis = true;
// 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%;
.login_box { .login_box {
width: 950px; width: 950px;
height: 510px; height: 510px;
border-radius: 2.5rem; border-radius: 2.5rem;
box-shadow: 1px 1px 20px #043B26; box-shadow: 1px 1px 20px #043B26;
background-color: #fff; background-color: #fff;
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
.system_name { .system_name {
font-size: 24px; font-size: 24px;
text-align: center; text-align: center;
height: 90px; height: 90px;
line-height: 100px; line-height: 100px;
color: #497FF7; color: #497FF7;
} }
.login_form {
width: 340px;
}
}
.login_context { .login_form {
display: flex; width: 340px;
justify-content: space-between;
align-items: center;
height: 400px;
padding: 0 80px;
}
} }
}
.login_context {
display: flex;
justify-content: space-between;
align-items: center;
height: 400px;
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