Browse Source

联调加入团队接口

lisiyan 2 years ago
parent
commit
4e040be0d2
4 changed files with 62 additions and 18 deletions
  1. 26 5
      src/views/Assignlicense.vue
  2. 5 3
      src/views/Create.vue
  3. 0 1
      src/views/Dashboard.vue
  4. 31 9
      src/views/Login.vue

+ 26 - 5
src/views/Assignlicense.vue

@@ -10,7 +10,6 @@ export default {
       teamAssign: '',
       teamProduct: '',
       memberId: '',
-      product: '',
       teamList: [],
       memberList: [],
       productList: []
@@ -25,22 +24,44 @@ export default {
     )
   },
   watch: {
-    team: {
+    signleAssign: {
       handler(val) {
         if (val) {
           this.memberId = []
-          this.product = []
+          this.signleProduct = []
           //获取成员列表
           get(
             'http://81.68.234.235:8032/pdf-tech/vppRTeamMemberRole/listByTeamId?teamId=' +
-              this.team
+              this.signleAssign
           ).then((res) => {
             this.memberList = res.data.result
           })
           //获取产品列表
           get(
             'http://81.68.234.235:8032/pdf-tech/product/listWithSimpleInfo?teamId=' +
-              this.team
+              this.signleAssign
+          ).then((res) => {
+            this.productList = res.data.result
+          })
+        }
+      }
+    },
+    teamAssign: {
+      handler(val) {
+        if (val) {
+          this.memberId = []
+          this.teamProduct = []
+          //获取成员列表
+          get(
+            'http://81.68.234.235:8032/pdf-tech/vppRTeamMemberRole/listByTeamId?teamId=' +
+              this.signleAssign
+          ).then((res) => {
+            this.memberList = res.data.result
+          })
+          //获取产品列表
+          get(
+            'http://81.68.234.235:8032/pdf-tech/product/listWithSimpleInfo?teamId=' +
+              this.teamAssign
           ).then((res) => {
             this.productList = res.data.result
           })

+ 5 - 3
src/views/Create.vue

@@ -15,6 +15,7 @@ export default {
       passwordType: false,
       passwordConfirmType: false,
       result: true,
+      teamIds: '',
       verificationCodeError: false,
       passwordError: false,
       passwordConfirmError: false,
@@ -86,8 +87,9 @@ export default {
         this.loading = true
         this.$refs['ruleForm'].validate((valid) => {
           if (valid) {
-            let teamIds = this.$route.query.teamIds.split(',')
-            console.log(teamIds)
+            if (this.$route.query.teamIds) {
+              this.teamIds = this.$route.query.teamIds.split(',')
+            }
             post('http://81.68.234.235:8032/pdf-tech/vppMember/create', {
               email: this.ruleForm.email,
               verifyCode: this.ruleForm.verificationCode,
@@ -97,7 +99,7 @@ export default {
               industry: this.ruleForm.industry,
               company: this.ruleForm.company,
               code: this.$route.query.code,
-              teamIds: teamIds
+              teamIds: this.teamIds
             }).then((res) => {
               this.loading = false
               if (

+ 0 - 1
src/views/Dashboard.vue

@@ -238,7 +238,6 @@ export default {
       get('http://81.68.234.235:8032/pdf-tech/product/listWithAdmin').then((res) => {
         if (res.data.code === 200) {
           this.productList = res.data.result
-          console.log(this.productList)
         }
       })
     },

+ 31 - 9
src/views/Login.vue

@@ -12,6 +12,7 @@ export default {
       passwordError: false,
       emailError: false,
       empty: true,
+      teamIds: '',
       passwordType: false,
       remenber: false,
       ruleForm: {
@@ -73,17 +74,31 @@ export default {
                 } else {
                   localStorage.removeItem('isRemenber')
                 }
-                setTimeout(()=>{
-                  get('http://81.68.234.235:8032/pdf-tech/vppMember/getMemberInfo').then((res)=>{
-                    if (res.data.result.role == 1 || res.data.result.role == 2) {
+                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')
                     }
                   })
-                  post("http://81.68.234.235:8032/pdf-tech/vppTeam/enterTeam").then((res)=>{
-                    console.log(res)
-                  })
                 })
               } else if (
                 res.data.code === 306 &&
@@ -147,7 +162,10 @@ export default {
               @input="isdisable()"
               placeholder="Email address"
             />
-            <Error class="w-14px h-14px block" :class="emailError ? 'block' : 'hidden'" />
+            <Error
+              class="w-14px h-14px block"
+              :class="emailError ? 'block' : 'hidden'"
+            />
           </div>
         </el-form-item>
         <el-form-item prop="password">
@@ -168,7 +186,10 @@ export default {
               <Eyeopen v-show="passwordType" />
               <Eyecolse v-show="!passwordType" />
             </span>
-            <Error class="w-14px h-14px block" :class="passwordError ? 'block' : 'hidden'" />
+            <Error
+              class="w-14px h-14px block"
+              :class="passwordError ? 'block' : 'hidden'"
+            />
           </div>
         </el-form-item>
         <el-form-item>
@@ -206,7 +227,8 @@ export default {
 
 <style lang="scss" scoped>
 .bg {
-  background: #e7eaee url('@/assets/images/background.png') center center no-repeat;
+  background: #e7eaee url('@/assets/images/background.png') center center
+    no-repeat;
 }
 .loginBox {
   box-shadow: 0px 0px 12px rgba(35, 97, 169, 0.05);