|
@@ -82,32 +82,12 @@ export default {
|
|
|
post(
|
|
|
'/pdf-tech/vppTeam/enterTeam',
|
|
|
urlencoded
|
|
|
- ).then((res) => {})
|
|
|
+ ).then((res) => {
|
|
|
+ this.getMemberInfo()
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.getMemberInfo()
|
|
|
}
|
|
|
- get(
|
|
|
- '/pdf-tech/vppMember/getMemberInfo'
|
|
|
- ).then((res) => {
|
|
|
- if (res.data.code === 200 && res.data.msg == 'success') {
|
|
|
- userStore().setUserInfo(res.data.result)
|
|
|
- get(
|
|
|
- '/pdf-tech/vppLicenseCode/checkCompanyLicense?companyId='+res.data.result.companyId
|
|
|
- ).then((res)=>{
|
|
|
- if(!res.data.result){
|
|
|
- this.$router.push('/noadmin')
|
|
|
- return
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- if (
|
|
|
- // parseInt(res.data.result.role) === 1 ||
|
|
|
- // parseInt(res.data.result.role) === 2
|
|
|
- res.data.result.role?.indexOf("2") !== -1 || res.data.result.role?.indexOf("1") !== -1
|
|
|
- ) {
|
|
|
- this.$router.push('/dashboard')
|
|
|
- } else {
|
|
|
- this.$router.push('/noadmin')
|
|
|
- }
|
|
|
- })
|
|
|
})
|
|
|
})
|
|
|
localStorage.setItem('username', this.ruleForm.email)
|
|
@@ -166,6 +146,28 @@ export default {
|
|
|
if (this.ruleForm.password.trim() !== '') {
|
|
|
this.passwordError = false
|
|
|
}
|
|
|
+ },
|
|
|
+ getMemberInfo () {
|
|
|
+ get('/pdf-tech/vppMember/getMemberInfo').then((res) => {
|
|
|
+ if (res.data.code === 200 && res.data.msg == 'success') {
|
|
|
+ userStore().setUserInfo(res.data.result)
|
|
|
+ get(
|
|
|
+ '/pdf-tech/vppLicenseCode/checkCompanyLicense?companyId='+res.data.result.companyId
|
|
|
+ ).then((res)=>{
|
|
|
+ if(!res.data.result){
|
|
|
+ this.$router.push('/noadmin')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ res.data.result.role?.indexOf("2") !== -1 || res.data.result.role?.indexOf("1") !== -1
|
|
|
+ ) {
|
|
|
+ this.$router.push('/dashboard')
|
|
|
+ } else {
|
|
|
+ this.$router.push('/noadmin')
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|