7990d2b4 by tianhaohao@pashanhoo.com

Merge branch 'dev' of http://yun.pashanhoo.com:9090/bdc/bdcdj-web into dev

2 parents a42ebf6f 4f1755d2
This file is too large to display.
......@@ -68,7 +68,7 @@
if (process.env.NODE_ENV === 'development') {
localStorage.removeItem('token')
} else {
Cookies.remove('accessToken')
Cookies.remove('ACCESS_TOKEN')
}
if (window._config.casEnable) {
window.location.href = window._config.casBaseURL + '/logout?service=' + encodeURIComponent(window.location.href);
......
/*
* @Description: 项目权限
* @Autor: renchao
* @LastEditTime: 2023-06-13 10:49:43
* @LastEditTime: 2023-06-13 16:28:25
*/
import Vue from 'vue'
import axios from 'axios'
......@@ -23,7 +23,7 @@ router.beforeEach(async (to, from, next) => {
let hasAddDict = store.state.dict.addDict
let hasAddRoute = store.state.permission.addRoutes
// cas操作
const token = localStorage.getItem("token") || Cookies.get('accessToken');
const token = localStorage.getItem("token") || Cookies.get('ACCESS_TOKEN');
if (to.path === '/login') {
if (token) {
next('/')
......@@ -46,7 +46,7 @@ router.beforeEach(async (to, from, next) => {
if (process.env.NODE_ENV === 'development') {
localStorage.setItem('token', res.data.content.accessToken)
} else {
Cookies.set('accessToken', res.data.content.accessToken)
Cookies.set('ACCESS_TOKEN', res.data.content.accessToken)
}
window.location.href = localStorage.getItem('location')
......
......@@ -2,7 +2,7 @@
/*
* @Description: 此文件主要创建 axios 实例,然后添加请求拦截器和响应拦截器
* @Autor: renchao
* @LastEditTime: 2023-06-13 10:47:45
* @LastEditTime: 2023-06-13 16:28:57
*/
import axios from 'axios'
import Router from '@/router'
......@@ -35,7 +35,7 @@ service.interceptors.request.use(
config.headers.delete('Authorization')
}
} else {
const token = Cookies.get('accessToken')
const token = Cookies.get('ACCESS_TOKEN')
// 添加请求头
if (token) {
config.headers['Authorization'] = 'Bearer ' + token
......@@ -78,7 +78,7 @@ service.interceptors.response.use(
if (process.env.NODE_ENV === 'development') {
localStorage.removeItem('token')
} else {
Cookies.remove('accessToken')
Cookies.remove('ACCESS_TOKEN')
}
if (window._config.casEnable) {
window.location.href = window._config.casBaseURL + '/logout?service=' + encodeURIComponent(locationUrl);
......
<!--
* @Description: 页面提供插件下载
* @Autor: renchao
* @LastEditTime: 2023-06-13 15:49:55
-->
<template>
<div class='downLoad'>
<p>{{formData}}是否下载文件?</p>
<div>
<el-button @click="$popupCacel">取消</el-button>
<el-button type="primary" @click="handleDown">确定</el-button>
</div>
</div>
</template>
<script>
export default {
props: {
formData: {
type: Object,
default: {}
}
},
methods: {
handleDown () {
let a = document.createElement('a')
a.style.display = 'none'
a.setAttribute('download', 'bg.jpg')
// a.href = require('../../../../public/')
document.body.appendChild(a)
console.log('href', a.href)
a.click()
document.body.removeChild(a)
}
}
}
</script>
<style scoped lang='scss'>
@import "~@/styles/public.scss";
</style>
\ No newline at end of file
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-06-13 13:12:25
* @LastEditTime: 2023-06-13 15:05:35
-->
<template>
<div>
......@@ -195,15 +195,20 @@
// 身份证读取
readClick (row) {
console.log(row, 'row');
var httpurl = "http://127.0.0.1:33088/";
var url = httpurl + "function=get_idcard&readnew=0"
axios.post(url).then(res => {
let data = res.data.IDCardInfo
row.sqrmc = data.name
row.zjzl = 1
row.zjh = data.cardID
if (res.data.code == 1) {
this.$message({
message: res.data.message,
type: 'warning'
})
} else {
let data = res.data.IDCardInfo
row.sqrmc = data.name
row.zjzl = 1
row.zjh = data.cardID
}
})
},
// 修改
......