Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
momo的小宝贝
vue2-elm
提交
904f7ac5
V
vue2-elm
项目概览
momo的小宝贝
/
vue2-elm
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vue2-elm
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
904f7ac5
编写于
3月 01, 2017
作者:
M
maguohua
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
udpate
上级
cd1ed9df
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
29 addition
and
18 deletion
+29
-18
src/page/profile/children/children/children/add.vue
src/page/profile/children/children/children/add.vue
+20
-9
src/store/action.js
src/store/action.js
+4
-4
src/store/index.js
src/store/index.js
+0
-2
src/store/mutations.js
src/store/mutations.js
+5
-3
未找到文件。
src/page/profile/children/children/children/add.vue
浏览文件 @
904f7ac5
...
@@ -56,11 +56,11 @@
...
@@ -56,11 +56,11 @@
standbytele
:
''
,
standbytele
:
''
,
standbytelenum
:
''
,
standbytelenum
:
''
,
addSearch
:
false
,
addSearch
:
false
,
//
newAddress:{}, //增加数组的元素
newAddress
:{},
//增加数组的元素
}
}
},
},
created
(){
created
(){
console
.
log
(
this
.
addAddress
)
},
},
mixins
:
[
getImgPath
],
mixins
:
[
getImgPath
],
components
:
{
components
:
{
...
@@ -69,14 +69,15 @@
...
@@ -69,14 +69,15 @@
},
},
computed
:{
computed
:{
...
mapState
([
...
mapState
([
'
addAddress
'
,
'
addAddress
'
,
'
removeAddress
'
,
'
newAddress
'
,
]),
]),
...
mapMutations
([
'
ADD_ADDRESS
'
])
},
},
props
:[],
props
:[],
methods
:
{
methods
:
{
...
mapMutations
([
'
ADD_ADDRESS
'
]),
inputThing
(){
inputThing
(){
(
!
this
.
message
)
?
this
.
verify
=
true
:
this
.
verify
=
false
;
(
!
this
.
message
)
?
this
.
verify
=
true
:
this
.
verify
=
false
;
this
.
bindThing
()
this
.
bindThing
()
...
@@ -122,9 +123,19 @@
...
@@ -122,9 +123,19 @@
}
}
},
},
submitThing
(){
submitThing
(){
if
(
this
.
butpart
){
//if(this.butpart){
//this.ADD_ADDRESS({"name":this.message,"address":this.mesthree,"address_detail":})
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
);
//}
}
}
}
}
}
}
...
...
src/store/action.js
浏览文件 @
904f7ac5
...
@@ -25,10 +25,10 @@ export default {
...
@@ -25,10 +25,10 @@ export default {
if
(
state
.
removeAddress
.
length
>
0
)
return
;
if
(
state
.
removeAddress
.
length
>
0
)
return
;
let
addres
=
await
getAddressList
(
state
.
userInfo
.
user_id
).
then
(
res
=>
{
//
let addres = await getAddressList(state.userInfo.user_id).then( res =>{
return
res
//
return res
});
//
});
let
addres
=
await
getAddressList
()
commit
(
SAVE_ADDRESS
,
addres
);
commit
(
SAVE_ADDRESS
,
addres
);
},
},
}
}
\ No newline at end of file
src/store/index.js
浏览文件 @
904f7ac5
...
@@ -31,8 +31,6 @@ const state = {
...
@@ -31,8 +31,6 @@ const state = {
removeAddress
:[],
//移除地址
removeAddress
:[],
//移除地址
addAddress
:
''
,
//新增地址
addAddress
:
''
,
//新增地址
question
:
null
,
//问题详情
question
:
null
,
//问题详情
//增加地址的几个key值
newAddress
:{},
}
}
export
default
new
Vuex
.
Store
({
export
default
new
Vuex
.
Store
({
...
...
src/store/mutations.js
浏览文件 @
904f7ac5
...
@@ -27,6 +27,7 @@ import {
...
@@ -27,6 +27,7 @@ import {
SAVE_QUESTION
,
SAVE_QUESTION
,
ADD_ADDRESS
,
ADD_ADDRESS
,
}
from
'
./mutation-types.js
'
}
from
'
./mutation-types.js
'
import
{
import
{
setStore
,
setStore
,
getStore
,
getStore
,
...
@@ -262,8 +263,9 @@ export default {
...
@@ -262,8 +263,9 @@ export default {
[
SAVE_QUESTION
](
state
,
question
)
{
[
SAVE_QUESTION
](
state
,
question
)
{
state
.
question
=
{...
question
};
state
.
question
=
{...
question
};
},
},
[
ADD_ADDRESS
](
state
,
obj
){
state
.
newAddress
=
{...
obj
};
[
ADD_ADDRESS
](
state
,
obj
)
{
state
.
removeAddress
=
state
.
removeAddress
.
unshift
(
state
.
newAddress
)
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录