Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
system
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
_site-res
system
Commits
1008ad29
Commit
1008ad29
authored
Sep 29, 2018
by
tufengqi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '
TRADE-641
' into 'master'
商家申请问题配置 Closes
TRADE-641
See merge request
!15
parents
d2fc25eb
91a9a30e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
189 additions
and
0 deletions
+189
-0
MerchantApplyQuestionsConst.php
classes/app/constant/MerchantApplyQuestionsConst.php
+189
-0
No files found.
classes/app/constant/MerchantApplyQuestionsConst.php
0 → 100644
View file @
1008ad29
<?php
/**
* Created by PhpStorm.
* User: fengp
* Date: 2018/9/28
* Time: 18:15
*/
namespace
app\constant
;
class
MerchantApplyQuestionsConst
{
/**
* 所有问题列表
*/
const
QUESTIONS_LIST
=
[
1
=>
[
'id'
=>
1
,
'title'
=>
'已有数字资产合计占家庭现有总资产(不含自住、自用房产及汽车等固定资产)的比例是'
,
'radio'
=>
true
,
'group_id'
=>
1
,
'items'
=>
[
'70%以上'
,
'50%-70%'
,
'30%-50%'
,
'10%-30%'
,
]
],
2
=>
[
'id'
=>
2
,
'title'
=>
'计划投入C2C的资金'
,
'radio'
=>
true
,
'group_id'
=>
1
,
'items'
=>
[
'1万元以下'
,
'1万-5万'
,
'5万-10万'
,
'10万-30万'
,
'30万-100万'
,
'100万以上'
,
]
],
3
=>
[
'id'
=>
3
,
'title'
=>
'您是否有尚未清偿的数额较大的债务,如有,其性质是'
,
'radio'
=>
true
,
'group_id'
=>
1
,
'items'
=>
[
'没有'
,
'有,住房抵押贷款等长期定额债务'
,
'有,信用卡欠款、消费信贷等短期信用债务'
,
'有,亲朋之间借款'
,
]
],
4
=>
[
'id'
=>
4
,
'title'
=>
'您的收入主要来自'
,
'radio'
=>
true
,
'group_id'
=>
1
,
'items'
=>
[
'工资奖金'
,
'生产经营'
,
'金融或房地产投资'
,
'其他'
,
]
],
5
=>
[
'id'
=>
5
,
'title'
=>
'您的投资经验包含'
,
'radio'
=>
false
,
'group_id'
=>
2
,
'items'
=>
[
'银行活期或定期存款'
,
'基金、保险或P2P'
,
'股票'
,
'期权、期货或创业板等高风险产品'
,
'期权、数字货币或艾西欧'
,
'有金融学习或工作经验'
,
]
],
6
=>
[
'id'
=>
6
,
'title'
=>
'最早投资数字货币的时间'
,
'radio'
=>
true
,
'group_id'
=>
2
,
'items'
=>
[
'还没有投资过'
,
'2013年以前'
,
'2013年-2015年'
,
'2015年-2016年'
,
'2017年以后'
,
]
],
7
=>
[
'id'
=>
7
,
'title'
=>
'您认为自己能承受的最大投资损失是多少'
,
'radio'
=>
true
,
'group_id'
=>
3
,
'items'
=>
[
'尽可能保证本金安全'
,
'一定的投资损失'
,
'较大的投资损失'
,
]
],
8
=>
[
'id'
=>
8
,
'title'
=>
'面对币价波动或突变,是否有自己的应对策略'
,
'radio'
=>
true
,
'group_id'
=>
3
,
'items'
=>
[
'没有'
,
'有'
,
]
],
9
=>
[
'id'
=>
9
,
'title'
=>
'您的最高学历是'
,
'radio'
=>
true
,
'group_id'
=>
4
,
'items'
=>
[
'高中或以下'
,
'大学专科'
,
'大学本科'
,
'硕士及以上'
,
]
],
];
/**
* 问题组列表
*/
const
GRUNP_LIST
=
[
1
=>
[
'id'
=>
1
,
'title'
=>
'财务状况'
,
],
2
=>
[
'id'
=>
2
,
'title'
=>
'投资经验'
,
],
3
=>
[
'id'
=>
3
,
'title'
=>
'风险控制'
,
],
4
=>
[
'id'
=>
4
,
'title'
=>
'其他信息'
,
]
];
/**
* 格式化问题原始数据
* @return array
*/
public
function
packageOriginalData
(){
$result
=
[];
foreach
(
self
::
GRUNP_LIST
as
$k
=>
$v
)
{
$res
=
[];
$res
[
'group'
]
=
$v
;
foreach
(
self
::
QUESTIONS_LIST
as
$q
=>
$item
)
{
if
(
$item
[
'group_id'
]
==
$k
)
{
$res
[
'items'
][]
=
$item
;
}
}
$result
[]
=
$res
;
}
return
$result
;
}
/**
* 格式化问题提交数据
* @param array $checked
* @return array
*/
public
function
packageHistoryData
(
$checked
){
$result
=
[];
foreach
(
$checked
as
$k
=>
$v
)
{
$res
=
[];
$res
[
'group'
]
=
self
::
GRUNP_LIST
[
$k
];
foreach
(
$v
as
$q
=>
$item
)
{
$res
[
'items'
][]
=
array_merge
(
self
::
QUESTIONS_LIST
[
$q
],
[
'checked'
=>
$item
]);
}
$result
[]
=
$res
;
}
return
$result
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment