Commit abffb723 authored by Morson's avatar Morson

修改地址保存问题

parent 77407bcf
......@@ -79,38 +79,35 @@ export default {
title: '新增地址',
show: false,
location: '',
address: '',
type: '充电桩安装',
name: '--',
mobile: '',
settled: null,
};
},
computed: {
settled() {
return this.vuex_settled && this.vuex_settled.record || null
},
type() {
return this.settled.type || '充电桩安装'
},
name() {
return this.settled.id_card_name || this.settled.nickname || this.settled.name || '--'
},
mobile() {
return this.settled.mobile
},
address() {
return this.settled.address
},
},
computed: {},
async onLoad(e) {
if(e && e.title) {
this.title = decodeURIComponent(e.title)
}
if(!this.vuex_token) {
this.$u.route({url: 'pages/login/index'})
} else if(!this.settled) {
this.getData();
}
this.getData();
},
methods: {
async getData() {
getApp().getBaseInfo(this);
const callback = (vm, res) => {
vm.settled = res.record
vm.address = vm.settled.address
vm.name = vm.settled.id_card_name
vm.mobile = vm.settled.mobile
}
if(this.vuex_settled && this.vuex_settled.record || null) {
callback(this, this.vuex_settled)
}
getApp().getBaseInfo(this, callback);
this.initLocation()
},
/**
......
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