|
|
@@ -4,7 +4,10 @@
|
|
|
<span>{{ $t('profile.personalInformation') }}</span>
|
|
|
</div>
|
|
|
|
|
|
- <el-form v-loading="loading" wi>
|
|
|
+ <el-form v-loading="loading">
|
|
|
+ <el-form-item :label="$t('shop.country')">
|
|
|
+ <el-input v-model="countryName" size="medium" prefix-icon="el-icon-user-solid" readonly />
|
|
|
+ </el-form-item>
|
|
|
<el-form-item :label="$t('shop.memberCode')">
|
|
|
<el-input v-model="user.name" size="medium" prefix-icon="el-icon-user-solid" readonly />
|
|
|
</el-form-item>
|
|
|
@@ -44,9 +47,27 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- loading: false
|
|
|
+ loading: false,
|
|
|
+ countryName:''
|
|
|
}
|
|
|
},
|
|
|
+ mounted() {
|
|
|
+ this.getCountries()
|
|
|
+ },
|
|
|
+ watch:{
|
|
|
+ countriesList: {
|
|
|
+ handler(newValue, old) {
|
|
|
+ if (newValue) {
|
|
|
+ this.getCountryId()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ computed:{
|
|
|
+ countriesList() {
|
|
|
+ return this.$store.getters.getCountriesList
|
|
|
+ },
|
|
|
+ },
|
|
|
methods: {
|
|
|
submit() {
|
|
|
const data = {
|
|
|
@@ -81,6 +102,16 @@ export default {
|
|
|
})
|
|
|
this.loading = false
|
|
|
})
|
|
|
+ },
|
|
|
+ //国家列表
|
|
|
+ getCountries() {
|
|
|
+ this.$store.dispatch('settings/getCountries')
|
|
|
+ },
|
|
|
+ getCountryId(){
|
|
|
+ let countryId = JSON.parse(window.localStorage.getItem('baseData')).COUNTRY_ID
|
|
|
+ let country = this.countriesList.find(item => item.ID === countryId)
|
|
|
+ console.log(country)
|
|
|
+ this.countryName = country.NAME
|
|
|
}
|
|
|
}
|
|
|
}
|