Commit b3089c31 authored by Xuguangxing's avatar Xuguangxing

fix: 处理地址substring

parent 2f83349e
...@@ -55,6 +55,7 @@ export default { ...@@ -55,6 +55,7 @@ export default {
const params = { const params = {
editAddress: item editAddress: item
}; };
console.log(params, JSON.stringify(params));
this.$router.push({ this.$router.push({
name: 'addressManage', name: 'addressManage',
params, params,
......
...@@ -98,13 +98,15 @@ export default { ...@@ -98,13 +98,15 @@ export default {
this.type = this.$route.query.type || ''; this.type = this.$route.query.type || '';
this.order = this.$route.query.type || false; this.order = this.$route.query.type || false;
if (this.type === 'edit') { if (this.type === 'edit') {
console.log(JSON.stringify(this.$route.params)); console.log(this.$route.params);
const data = { ...this.$route.params.editAddress }; const data = { ...this.$route.params.editAddress };
if (data.addrFullName) {
data.addrFullName = data.addrFullName data.addrFullName = data.addrFullName
.substring(0, data.addrFullName.length - data.detail.length) .substring(0, data.addrFullName.length - data.detail.length)
.replace(/()/g, ''); .replace(/()/g, '');
this.address = data; this.address = data;
} }
}
}, },
methods: { methods: {
handlePickerShow(e) { handlePickerShow(e) {
......
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