提交 904f7ac5 编写于 作者: M maguohua

udpate

上级 cd1ed9df
......@@ -56,11 +56,11 @@
standbytele:'',
standbytelenum:'',
addSearch:false,
//newAddress:{}, //增加数组的元素
newAddress:{}, //增加数组的元素
}
},
created(){
console.log(this.addAddress)
},
mixins: [getImgPath],
components: {
......@@ -69,14 +69,15 @@
},
computed:{
...mapState([
'addAddress',
'addAddress','removeAddress','newAddress',
]),
...mapMutations([
'ADD_ADDRESS'
])
},
props:[],
methods: {
...mapMutations([
'ADD_ADDRESS'
]),
inputThing(){
(!this.message) ? this.verify=true : this.verify=false;
this.bindThing()
......@@ -122,9 +123,19 @@
}
},
submitThing(){
if(this.butpart){
//this.ADD_ADDRESS({"name":this.message,"address":this.mesthree,"address_detail":})
}
//if(this.butpart){
this.ADD_ADDRESS({
name: this.message,
address: this.mesthree,
address_detail: this.addAddress,
geohash: 'wtw37r7cxep4',
phone: this.telenum,
phone_bk: this.standbytelenum,
poi: this.addAddress,
poi_type: 0,
});
this.$router.go(-1);
//}
}
}
}
......
......@@ -25,10 +25,10 @@ export default {
if(state.removeAddress.length > 0) return;
let addres = await getAddressList(state.userInfo.user_id).then( res =>{
return res
});
// let addres = await getAddressList(state.userInfo.user_id).then( res =>{
// return res
// });
let addres = await getAddressList()
commit(SAVE_ADDRESS, addres);
},
}
\ No newline at end of file
......@@ -31,8 +31,6 @@ const state = {
removeAddress:[],//移除地址
addAddress:'', //新增地址
question: null,//问题详情
//增加地址的几个key值
newAddress:{},
}
export default new Vuex.Store({
......
......@@ -27,6 +27,7 @@ import {
SAVE_QUESTION,
ADD_ADDRESS,
} from './mutation-types.js'
import {
setStore,
getStore,
......@@ -262,8 +263,9 @@ export default {
[SAVE_QUESTION](state, question) {
state.question = {...question};
},
[ADD_ADDRESS](state, obj){
state.newAddress = {...obj};
state.removeAddress = state.removeAddress.unshift(state.newAddress)
[ADD_ADDRESS](state, obj) {
console.log(state.removeAddress)
state.removeAddress = [...state.removeAddress, obj];
}
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册