tenggouwa 7 vuotta sitten
vanhempi
commit
75668695af
1 muutettua tiedostoa jossa 24 lisäystä ja 14 poistoa
  1. 24 14
      src/views/agent/applyAgent.vue

+ 24 - 14
src/views/agent/applyAgent.vue

@@ -37,7 +37,7 @@
               <el-form-item label="手机号:" class="only">
                 <el-input :disabled="showG" v-model="applyform.mobile" placeholder="请输入您的手机号码">
                   <template slot="prepend">
-                    <el-select v-model="valueMobile" placeholder="请选择":disabled="showG" >
+                    <el-select v-model="applyform.mobile_area" placeholder="请选择":disabled="showG" >
                       <el-option
                         v-for="item in options"
                         :key="item.code"
@@ -58,12 +58,12 @@
                 <el-select :disabled="showG" v-model="applyform.country" class="firstbox" clearable placeholder="所属国家" @change="getcont">
                   <el-option
                     v-for="item in countryOptions"
-                    :key="item.id"
-                    :label="item.name"
-                    :value="item.id">
+                    :key="item.sname"
+                    :label="item.ch_name"
+                    :value="item.sname">
                   </el-option>
                 </el-select>
-                <el-select :disabled="showG" v-model="applyform.area" class="firstbox" clearable placeholder="所属省份">
+                <el-select :disabled="showG||showSheng" v-model="applyform.area" class="firstbox" clearable placeholder="所属省份">
                   <el-option
                     v-for="item in cityOptions"
                     :key="item.id"
@@ -144,7 +144,7 @@ import {ajax} from "../../assets/js/common.js"
 export default{
   data(){
     return{
-      valueMobile:'',
+      showSheng:false,
       options:[],
       getjindu:0,
       showG:false,
@@ -187,6 +187,7 @@ export default{
         other:'',
         country:"",
         area:'',
+        mobile_area:'',
       },
       locationGroup:{
         country:"",
@@ -341,9 +342,12 @@ export default{
       },'POST')
       // this.dialogtit=true;
     },
-    //获取省份列表
+    //获取国家列表
     getCountry(){
-      ajax(this,this.extendApi.applyCountry,'',(res)=>{
+      let param = {
+        type:'name',
+      }
+      ajax(this,this.extendApi.phoneCountry,param,(res)=>{
         if(res.code == 200){
           this.countryOptions = res.data;
         }else{
@@ -355,13 +359,19 @@ export default{
     getcont(e){
       this.applyform.area = '';
       this.countrySize.pid = e;
-      ajax(this,this.extendApi.applyCountry,this.countrySize,(param)=>{
-        if(param.code == 200){
-          this.cityOptions = param.data
-        }else{
+      if(e == 86){
+        this.showSheng = false;
+        ajax(this,this.extendApi.applyCountry,'',(param)=>{
+          if(param.code == 200){
+            this.cityOptions = param.data
+          }else{
 
-        }
-      },'GET')
+          }
+        },'GET')
+      }else{
+        this.showSheng = true;
+      }
+      
     },
   }
 }