|
|
@@ -58,7 +58,7 @@
|
|
|
import Http from '@/js/http'
|
|
|
import Apis from '@/js/api'
|
|
|
import {notify} from '@/constants/index'
|
|
|
- import {storageGet,getAllServiceTypes} from '@/js/index'
|
|
|
+ import {storageGet,getAllServiceTypes,getProvinceNameByProvinceCode,getProvinceCodeByProvinceName} from '@/js/index'
|
|
|
import provincecity from '@/components/commons/ProvinceCity'
|
|
|
export default {
|
|
|
name: "Mine",
|
|
|
@@ -89,7 +89,7 @@
|
|
|
this.isModifyMode = false;
|
|
|
})
|
|
|
},
|
|
|
- //联系地址
|
|
|
+ //联系地址改变
|
|
|
locationChange (provinceId, cityId) {
|
|
|
if (provinceId || cityId) {
|
|
|
this.userForm.province = provinceId
|
|
|
@@ -137,7 +137,12 @@
|
|
|
loadData() {
|
|
|
Http.get(`/api/personal/display/${this.user.id}`).then((res) => {
|
|
|
this.userForm = res.userVO;
|
|
|
- this.userForm.personalCompetence = ['JKCS']
|
|
|
+ //获取省市code
|
|
|
+ // console.log(getProvinceCodeByProvinceName(this.userForm.province, this.userForm.city));;
|
|
|
+ let location = getProvinceCodeByProvinceName(this.userForm.province, this.userForm.city);
|
|
|
+ console.log(location)
|
|
|
+ this.userForm.province = location.provinceCode;
|
|
|
+ this.userForm.city = location.cityCode;
|
|
|
})
|
|
|
},
|
|
|
setUserInfo(){
|