Kaynağa Gözat

every thing is over

tenggouwa 7 yıl önce
ebeveyn
işleme
e5c43a511a
1 değiştirilmiş dosya ile 17 ekleme ve 2 silme
  1. 17 2
      src/views/agent/applyAgent.vue

+ 17 - 2
src/views/agent/applyAgent.vue

@@ -114,7 +114,7 @@
         class="dialog-content"
           :visible.sync="dialogtit">
           <span class="content"><i class="el-icon-information"></i>登陆后才可申请经济商!</span><br>
-          <button>立即登陆</button>
+          <button @click="jumptologin">立即登陆</button>
         </el-dialog>
       </div>
     </div>
@@ -211,9 +211,23 @@ export default{
   },
   mounted(){
     this.getCountry();
-    this.getStatus();
+    // this.getStatus();
+    this.loginup();
   },
   methods:{
+    //跳转登陆
+    jumptologin(){
+      this.$router.push({path:"/"});
+    },
+    //获取是否登陆
+    loginup(){
+      let e = localStorage.getItem("block_fxeestoken");
+      if (e && e!=''){
+        this.getStatus();
+      }else{
+        this.dialogtit=true;
+      }
+    },
     //获取状态
     getStatus(){
       ajax(this,this.extendApi.applyStatus,'',(res)=>{
@@ -256,6 +270,7 @@ export default{
       ajax(this,this.extendApi.applyToAgent,this.applyform,(data)=>{
         if(data.code == 200){
           this.dialogVisible = true;
+          this.getStatus();
         }else{
 
         }