|
@@ -4,6 +4,7 @@ import crypto from '@/crypto/crypto'
|
|
|
import Eyecolse from '@/components/icon/eye_colse.vue'
|
|
|
import Eyeopen from '@/components/icon/eye_open.vue'
|
|
|
import Error from '@/components/icon/error.vue'
|
|
|
+import { userStore } from '@/store/userInfo'
|
|
|
|
|
|
export default {
|
|
|
components: { Eyecolse, Eyeopen, Error },
|
|
@@ -65,6 +66,35 @@ export default {
|
|
|
res.data.result
|
|
|
).then((res) => {
|
|
|
this.$cookies.set('accessToken', res.data.result.accessToken)
|
|
|
+ setTimeout(() => {
|
|
|
+ if (this.$route.query.teamIds) {
|
|
|
+ this.teamIds = this.$route.query.teamIds.split(',')
|
|
|
+ }
|
|
|
+ var urlencoded = new URLSearchParams()
|
|
|
+ urlencoded.append('memberId', this.$route.query.memberId)
|
|
|
+ urlencoded.append('teamIds', this.teamIds)
|
|
|
+ urlencoded.append('action', this.$route.query.action)
|
|
|
+ urlencoded.append('code', this.$route.query.code)
|
|
|
+ post(
|
|
|
+ 'http://81.68.234.235:8032/pdf-tech/vppTeam/enterTeam',
|
|
|
+ urlencoded
|
|
|
+ ).then((res) => {})
|
|
|
+ get(
|
|
|
+ 'http://81.68.234.235:8032/pdf-tech/vppMember/getMemberInfo'
|
|
|
+ ).then((res) => {
|
|
|
+ if (res.data.code === 200 && res.data.msg == 'success') {
|
|
|
+ userStore().setUserInfo(res.data.result)
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ parseInt(res.data.result.role) === 1 ||
|
|
|
+ parseInt(res.data.result.role) === 2
|
|
|
+ ) {
|
|
|
+ this.$router.push('/dashboard')
|
|
|
+ } else {
|
|
|
+ this.$router.push('/noadmin')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
})
|
|
|
localStorage.setItem('username', this.ruleForm.email)
|
|
|
const SECRET_PWD = crypto.set(this.ruleForm.password) // 加密
|
|
@@ -74,32 +104,7 @@ export default {
|
|
|
} else {
|
|
|
localStorage.removeItem('isRemenber')
|
|
|
}
|
|
|
- setTimeout(() => {
|
|
|
- if (this.$route.query.teamIds) {
|
|
|
- this.teamIds = this.$route.query.teamIds.split(',')
|
|
|
- }
|
|
|
- var urlencoded = new URLSearchParams()
|
|
|
- urlencoded.append('memberId', this.$route.query.memberId)
|
|
|
- urlencoded.append('teamIds', this.teamIds)
|
|
|
- urlencoded.append('action', this.$route.query.action)
|
|
|
- urlencoded.append('code', this.$route.query.code)
|
|
|
- post(
|
|
|
- 'http://81.68.234.235:8032/pdf-tech/vppTeam/enterTeam',
|
|
|
- urlencoded
|
|
|
- ).then((res) => {})
|
|
|
- get(
|
|
|
- 'http://81.68.234.235:8032/pdf-tech/vppMember/getMemberInfo'
|
|
|
- ).then((res) => {
|
|
|
- if (
|
|
|
- res.data.result.role == 1 ||
|
|
|
- res.data.result.role == 2
|
|
|
- ) {
|
|
|
- this.$router.push('/dashboard')
|
|
|
- } else {
|
|
|
- this.$router.push('/noadmin')
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
+
|
|
|
} else if (
|
|
|
res.data.code === 306 &&
|
|
|
res.data.msg === '账号或者密码错误'
|