Commit 89b07410 by xinla

Merge branch 'develop'

2 parents efa6af4a 0c2b81c5
......@@ -34,7 +34,7 @@ export default {
const noAuth = this.$router.app.$route.meta ? this.$router.app.$route.meta.noAuth : false
if (!code && !noAuth) {
this.$toast('未获得授权')
this.$dialog({ message: '未获得授权' })
}
const noGetUser = this.$router.app.$route.meta ? this.$router.app.$route.meta.noAuth : false
......@@ -42,8 +42,17 @@ export default {
// this.$toast('未获得授权')
return
}
let { data } = await getUserInfo(code, this.agentId)
this.$store.state.userId = data.userId
let userId = sessionStorage.getItem('userId')
//取缓存中的用户信息
if (userId) {
userId = JSON.parse(userId)
} else {
let { data } = await getUserInfo(code, this.agentId)
// 存入sessionStorage,解决刷新重复code获取用户问题
sessionStorage.setItem('userId', JSON.stringify(data.userId))
userId = data.userId
}
this.$store.state.userId = userId
})
// this.$toast('userId:' + this.$store.state.userId)
......
......@@ -57,7 +57,7 @@ export function getQueryValue(name) {
}
export async function getWxCode() {
let userinfo = localStorage.getItem('userinfo')
let userinfo = sessionStorage.getItem('userinfo')
//取缓存中的用户信息
if (userinfo) {
try {
......@@ -90,7 +90,7 @@ export async function getWxCode() {
try {
let { data } = await getUserOpenid(code)
let { data: dataUser } = await getWechatUserInfo(data.openId)
localStorage.setItem('userinfo', JSON.stringify(dataUser))
sessionStorage.setItem('userinfo', JSON.stringify(dataUser))
return dataUser
} catch (error) {
alert(error)
......
......@@ -77,6 +77,27 @@
margin: 0 auto;
}
.el-dialog {
display: flex;
flex-direction: column;
margin: 0 !important;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
/*height:600px;*/
max-height: calc(100% - 30px);
max-width: calc(100% - 30px);
}
.el-dialog .el-dialog__body {
flex: 1;
overflow: auto;
}
// .el-dialog:not(.is-fullscreen) {
// margin-top: 6vh !important;
// }
// refine element ui upload
.upload-container {
.el-upload {
......
@import "./variables.scss";
@import "./mixin.scss";
@import "./transition.scss";
@import "./element-ui.scss";
@import "./sidebar.scss";
@import './variables.scss';
@import './mixin.scss';
@import './transition.scss';
@import './element-ui.scss';
@import './sidebar.scss';
::-webkit-scrollbar {
/*滚动条整体样式*/
......@@ -86,7 +86,7 @@ div:focus {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
content: ' ';
clear: both;
height: 0;
}
......@@ -100,8 +100,8 @@ aside {
display: block;
line-height: 32px;
font-size: 16px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell,
'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
color: #2c3e50;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
......@@ -189,10 +189,6 @@ aside {
z-index: 1000 !important;
}
.el-dialog:not(.is-fullscreen) {
margin-top: 6vh !important;
}
.el-table {
.el-table__header-wrapper,
.el-table__fixed-header-wrapper {
......@@ -392,7 +388,7 @@ aside {
height: auto;
}
.fr {
[class^="el-icon-"] {
[class^='el-icon-'] {
margin-left: 5px;
}
.el-icon-edit-outline {
......
......@@ -167,7 +167,7 @@ export default {
this.getCookie()
process.env.NODE_ENV !== 'development' &&
this.$alert(
'LinkWeChat V2.5 正式发布公测,遇到使用上的问题欢迎提交 Issue,我们将光速修复。',
'LinkWeChat V2.5 已正式发布,遇到使用上的问题欢迎提交 Issue,我们将光速修复。',
'提示',
{
confirmButtonText: '确定',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!