提交 ef3f041a authored 作者: xuyanwei's avatar xuyanwei

个人中心添加保存按钮

......@@ -148,7 +148,9 @@
getAreaTreeList(){//省市区
getAreaTreeAPI().then(res=>{
console.log(1212,res.data)
if( res.data.status ){
this.addressData=res.data.data;
}
})
......
......@@ -43,6 +43,7 @@
</div>
</li>
</ul>
<div class="saveB" @click="tipFn">保存</div>
<div class="cont2" :class="`contUser${curShow}`" v-if="isShow">
<!--用户名弹出框-->
......@@ -291,6 +292,25 @@
}
})
},
tipFn(){
if(!this.userMssage.realName||this.userMssage.realName==''){
Toast.fail('请填写真实姓名');
return
}
if(!this.userMssage.reserve3||this.userMssage.reserve3==''){
Toast.fail('请选择出生年份');
return
}
if(!this.userMssage.unitName||this.userMssage.unitName==''){
Toast.fail('请选择单位名称');
return
}
if(!this.userMssage.reserve2||this.userMssage.reserve2==''){
Toast.fail('请选择工作分类');
return
}
this.$router.push('/');
},
},
beforeDestroy() {
......@@ -395,6 +415,7 @@
color: #f56c6c;
}
}
.saveB{width: 3.45rem; height: .4rem;border-radius: .2rem;font-size: .15rem;color: #fff;text-align: center; line-height: .4rem;background:#2A80FB;margin: .3rem auto;}
.cont2 {
width: 100%;
......
......@@ -139,6 +139,7 @@
},
activated() {
if(!this.$route.meta.isBack|| this.isFirstEnter){
this.curType = 0;
this.list=[];// 把数据清空,可以稍微避免让用户看到之前缓存的数据
// 如果isBack是false,表明需要获取新数据,否则就不再请求,直接使用缓存的数据
this.loading=false;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论