lihongxiao 2 лет назад
Родитель
Сommit
54c5fb916d
2 измененных файлов с 19 добавлено и 27 удалено
  1. 2 12
      src/views/Core/PersonalPanel.vue
  2. 17 15
      src/views/Sys/Recruiting.vue

+ 2 - 12
src/views/Core/PersonalPanel.vue

@@ -77,7 +77,7 @@
     <!-- 修改密码 -->
     <psdreset ref="psdresetDialog" @afterRestore="afterReset"></psdreset>
     <!-- 闪电增员 -->
-    <Recruiting ref="recruitingDialog" :type="recruitingType"></Recruiting>
+    <Recruiting ref="recruitingDialog" ></Recruiting>
 
   </div>
 </template>
@@ -122,7 +122,6 @@ export default {
   data() {
     return {
       avatar: require("@/assets/user.png"),
-      recruitingType:''
     }
   },
   created(){
@@ -140,16 +139,7 @@ export default {
 
     //闪电增员
     recruiting() {
-      this.$api.user.recruitinQqueryType().then((res) => {
-        if(res.code==200){
-          this.recruitingType=res.data
-          this.$refs.recruitingDialog.setBackupVisible(true)
-        }
-        else{
-          this.$message.error(res.msg)
-        }
-          }).catch(function (res) {
-          })
+      this.$refs.recruitingDialog.setBackupVisible(true)
     },
     // 清除缓存
     clearCache(){

+ 17 - 15
src/views/Sys/Recruiting.vue

@@ -23,28 +23,30 @@ export default {
     },
     created() {
     },
-    props: {
-        type:{
-            type: String,
-            default:''
-        }
-    },
     
     methods: {
         // 设置可见性
         setBackupVisible: function (backupVisible) {
             var userId = Cookies.get("user");
-            let url=''
-            if(this.type=='2'){
-                url = this.global.h5BaseUrl + "/#/pages/register/orderissuer?id=" + userId;
-            }
+            this.$api.user.recruitinQqueryType().then((res) => {
+            if(res.code==200){
+                let url=''
+                if(res.data=='2'){
+                    url = this.global.h5BaseUrl + "/#/pages/register/orderissuer?id=" + userId;
+                }
+                else{
+                    url = this.global.h5BaseUrl + "/#/pages/register/register?id=" + userId;
+                }
+                this.backupVisible = backupVisible
+                this.$nextTick(() => {
+                    this.creatQrCode(url);
+                });
+                }
             else{
-                url = this.global.h5BaseUrl + "/#/pages/register/register?id=" + userId;
+            this.$message.error(res.msg)
             }
-            this.backupVisible = backupVisible
-            this.$nextTick(() => {
-                this.creatQrCode(url);
-            });
+        })
+           
         },
         creatQrCode(text) {
             if (this.qrcode) {