Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-insurance
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.frontend
pica-insurance
提交
3fd5a044
提交
3fd5a044
编写于
2月 20, 2023
作者:
张敬贤
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add
上级
864dd81b
变更
2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
18 行增加
和
3 行删除
+18
-3
home.js
src/store/modules/home.js
+16
-2
index.vue
src/views/appoint/index.vue
+2
-1
未找到文件。
src/store/modules/home.js
浏览文件 @
3fd5a044
...
...
@@ -3,12 +3,16 @@ import store from 'storejs';
export
default
{
namespaced
:
true
,
state
:
{
insuranceInfo
:
{}
insuranceInfo
:
{},
orderInfo
:{}
},
mutations
:
{
// 存值
SET_INSURANCE_INFO
(
state
,
val
=
{})
{
state
.
insuranceInfo
+=
val
;
state
.
insuranceInfo
=
val
;
},
SET_ORDER_INFO
(
state
,
val
=
{})
{
state
.
orderInfo
=
val
;
}
},
actions
:
{
...
...
@@ -17,12 +21,22 @@ export default {
commit
(
'SET_INSURANCE_INFO'
,
data
);
store
.
set
(
'insuranceInfo'
,
data
);
},
setOrderInfo
({
commit
},
data
)
{
commit
(
'SET_ORDER_INFO'
,
data
);
console
.
log
(
'SET_ORDER_INFO'
,
data
);
store
.
set
(
'orderInfo'
,
data
);
},
},
getters
:
{
// 获取 insuranceInfo 的值
insuranceInfo
:
state
=>
{
const
insuranceInfo
=
state
.
insuranceInfo
.
id
?
state
.
insuranceInfo
:
store
.
get
(
'insuranceInfo'
);
return
insuranceInfo
||
{};
},
// 获取 订单详情 的值
orderInfo
:
state
=>
{
const
orderInfo
=
state
.
orderInfo
.
yunOrderNo
?
state
.
orderInfo
:
store
.
get
(
'orderInfo'
);
return
orderInfo
||
{};
}
}
};
src/views/appoint/index.vue
浏览文件 @
3fd5a044
...
...
@@ -386,7 +386,7 @@ export default {
this
.
dectionData
=
dectionData
;
this
.
dectionForm
.
detectName
=
dectionData
.
detectionName
;
this
.
dectionForm
.
goodsId
=
dectionData
.
goodsId
;
this
.
$store
.
dispatch
(
'setInsuranceInfo'
,
dectionData
);
this
.
$store
.
dispatch
(
'
home/
setInsuranceInfo'
,
dectionData
);
}
});
...
...
@@ -398,6 +398,7 @@ export default {
this
.
dectionForm
.
beneficiaryName
=
res
.
data
.
beneficiaryName
;
this
.
dectionForm
.
beneficiaryPhone
=
res
.
data
.
beneficiaryPhone
;
this
.
dectionForm
.
beneficiaryIdNum
=
res
.
data
.
beneficiaryIdNum
;
this
.
$store
.
dispatch
(
'home/setOrderInfo'
,
res
.
data
);
});
},
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录