Commit 3b8085d4 authored by chenwei's avatar chenwei

default address

parent 2c8aedf6
...@@ -521,17 +521,7 @@ ...@@ -521,17 +521,7 @@
> >
</div> </div>
<div v-else style="display: flex"> <div v-else style="display: flex">
<div <div class="cancelBtn"
style="
width: 92px;
height: 30px;
background: #5ba8dc;
border: 2px solid #659fd5;
border-radius: 19px;
display: flex;
justify-content: center;
cursor: pointer;
"
@click="companyHanderCancel" @click="companyHanderCancel"
> >
<span <span
...@@ -1789,17 +1779,20 @@ export default { ...@@ -1789,17 +1779,20 @@ export default {
}); });
}, },
// 获取城市列表 // 获取城市列表
getCityList(id) { getCityList(id, status ='edit') {
getCityListByParent({ id }).then((res) => { getCityListByParent({ id }).then((res) => {
this.cityList = res.data; this.cityList = res.data;
if(status == 'edit'){
this.baseForm.city = ""; this.baseForm.city = "";
}
}); });
}, },
getInfo() { getInfo() {
getInfo().then((r) => { getInfo().then((r) => {
this.userInfo = r.data; this.userInfo = r.data;
this.addressForm.areaCode = this.userInfo.areaCode; this.addressForm.areaCode = this.userInfo.areaCode;
this.getCityList(r.data.country); this.getCityList(r.data.country,'init');
this.getAddressList(); this.getAddressList();
}); });
}, },
...@@ -1833,9 +1826,11 @@ export default { ...@@ -1833,9 +1826,11 @@ export default {
}, },
baseHanderEdit() { baseHanderEdit() {
this.baseEdit = true; this.baseEdit = true;
this.baseForm = { ...this.userInfo }; this.baseForm = {...this.userInfo};
}, },
baseHanderCancel() { baseHanderCancel() {
this.$refs.baseForm.clearValidate();
this.getInfo();
this.baseEdit = false; this.baseEdit = false;
}, },
baseHanderSubmit() { baseHanderSubmit() {
...@@ -2279,6 +2274,16 @@ export default { ...@@ -2279,6 +2274,16 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.cancelBtn{
width: 92px;
height: 30px;
background: #5ba8dc;
border: 2px solid #659fd5;
border-radius: 19px;
display: flex;
justify-content: center;
cursor: pointer;
}
.jd-label { .jd-label {
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment