Commit 89b07410 by xinla

Merge branch 'develop'

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