Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
BasicApp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
施贇杰
BasicApp
Commits
33cc55e3
Commit
33cc55e3
authored
Jul 12, 2019
by
shiyunjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
保险产品详情页
parent
f91124d9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
700 additions
and
71 deletions
+700
-71
README.md
README.md
+78
-4
project.pbxproj
ios/BasicApp.xcodeproj/project.pbxproj
+13
-2
UserInterfaceState.xcuserstate
...data/shiyunjie.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
BasicApp.xcscheme
...sicApp.xcodeproj/xcshareddata/xcschemes/BasicApp.xcscheme
+3
-3
Info.plist
ios/BasicApp/Info.plist
+4
-6
navigationStack.js
src/BasicNavigator/navigationStack.js
+4
-0
index.js
src/pages/Agera-App-Insure/config/index.js
+269
-0
index.js
src/pages/Agera-App-Insure/index.js
+123
-3
home.json
src/pages/home/home.json
+20
-20
service.json
src/pages/home/service.json
+0
-0
user.json
src/pages/home/user.json
+14
-14
ProductDetailPage.js
src/pages/insurePage/ProductDetailPage.js
+151
-0
localData.js
src/utils/api/localData.js
+21
-19
No files found.
README.md
View file @
33cc55e3
# Agera-cli 移动端项目模版
# Agera-cli 移动端项目模版
版本: 2019-6-1
最近更新: 2019-7-12
## 前言
前人栽树,后人乘凉。Agera的主要目的是
基于客户通项目封装,设计参考交银e保通,交银爱行销
Agera一期,要建立稳定的演示环境,演示在线投保(包括空中签名、保单签收),培训,绩效查询,行销工具
## 一期进度
### 已完成
命令行工具
脚手架RN 0.59.5
全局设置
redux-persist
navigation redux
theme
路由跳转传参
屏幕宽度
状态栏高度适配
App字体大小控制
热更新升级
组件示例
mock
decorator
homePage
userPage
ServicePage
InsureList
policyPage
Insure config
### 待开发
ReceiptPage
paymentPage
trainPage
achievement
原生webview
原生启动图
原生相册、拍照
原生ocr
原生人脸识别
原生签名
嵌入太平头条、健康讲堂、祝福卡
导入 邀请有礼、健步行、周周乐
## 依赖库
## 依赖库
...
@@ -24,7 +98,7 @@
...
@@ -24,7 +98,7 @@
##
初始化
##
如何使用
使用 agera-cli buildApp 初始化项目后,
使用 agera-cli buildApp 初始化项目后,
安装依赖
安装依赖
...
@@ -56,7 +130,7 @@ Android studio打开android目录下 build.gradle
...
@@ -56,7 +130,7 @@ Android studio打开android目录下 build.gradle
路由导航
路由导航
主题切换
主题切换
### 原生
### 原生
组件
原生组件使用示例:
原生组件使用示例:
...
@@ -70,7 +144,7 @@ Android studio打开android目录下 build.gradle
...
@@ -70,7 +144,7 @@ Android studio打开android目录下 build.gradle
启动页
启动页
webview
webview
### JS
### JS
组件
JS组件使用示例:
JS组件使用示例:
按钮
按钮
...
...
ios/BasicApp.xcodeproj/project.pbxproj
View file @
33cc55e3
...
@@ -1120,6 +1120,10 @@
...
@@ -1120,6 +1120,10 @@
CreatedOnToolsVersion
=
6.2
;
CreatedOnToolsVersion
=
6.2
;
TestTargetID
=
13B07F861A680F5B00A75B9A
;
TestTargetID
=
13B07F861A680F5B00A75B9A
;
};
};
13B07F861A680F5B00A75B9A
=
{
DevelopmentTeam
=
K3P7TW9FM8
;
ProvisioningStyle
=
Manual
;
};
2D02E47A1E0B4A5D006451C7
=
{
2D02E47A1E0B4A5D006451C7
=
{
CreatedOnToolsVersion
=
8.2.1
;
CreatedOnToolsVersion
=
8.2.1
;
ProvisioningStyle
=
Automatic
;
ProvisioningStyle
=
Automatic
;
...
@@ -1911,8 +1915,10 @@
...
@@ -1911,8 +1915,10 @@
isa
=
XCBuildConfiguration
;
isa
=
XCBuildConfiguration
;
buildSettings
=
{
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
CODE_SIGN_STYLE
=
Manual
;
CURRENT_PROJECT_VERSION
=
1
;
CURRENT_PROJECT_VERSION
=
1
;
DEAD_CODE_STRIPPING
=
NO
;
DEAD_CODE_STRIPPING
=
NO
;
DEVELOPMENT_TEAM
=
K3P7TW9FM8
;
HEADER_SEARCH_PATHS
=
(
HEADER_SEARCH_PATHS
=
(
"$(inherited)"
,
"$(inherited)"
,
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager"
,
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager"
,
...
@@ -1934,8 +1940,9 @@
...
@@ -1934,8 +1940,9 @@
"-ObjC"
,
"-ObjC"
,
"-lc++"
,
"-lc++"
,
);
);
PRODUCT_BUNDLE_IDENTIFIER
=
com.
basicapp
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.
cntaiping.tpapptest
;
PRODUCT_NAME
=
BasicApp
;
PRODUCT_NAME
=
BasicApp
;
PROVISIONING_PROFILE_SPECIFIER
=
tpapptestDep20181207
;
VERSIONING_SYSTEM
=
"apple-generic"
;
VERSIONING_SYSTEM
=
"apple-generic"
;
};
};
name
=
Debug
;
name
=
Debug
;
...
@@ -1944,7 +1951,10 @@
...
@@ -1944,7 +1951,10 @@
isa
=
XCBuildConfiguration
;
isa
=
XCBuildConfiguration
;
buildSettings
=
{
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
CODE_SIGN_IDENTITY
=
"iPhone Distribution"
;
CODE_SIGN_STYLE
=
Manual
;
CURRENT_PROJECT_VERSION
=
1
;
CURRENT_PROJECT_VERSION
=
1
;
DEVELOPMENT_TEAM
=
K3P7TW9FM8
;
HEADER_SEARCH_PATHS
=
(
HEADER_SEARCH_PATHS
=
(
"$(inherited)"
,
"$(inherited)"
,
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager"
,
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager"
,
...
@@ -1966,8 +1976,9 @@
...
@@ -1966,8 +1976,9 @@
"-ObjC"
,
"-ObjC"
,
"-lc++"
,
"-lc++"
,
);
);
PRODUCT_BUNDLE_IDENTIFIER
=
com.
basicapp
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.
cntaiping.tpapptest
;
PRODUCT_NAME
=
BasicApp
;
PRODUCT_NAME
=
BasicApp
;
PROVISIONING_PROFILE_SPECIFIER
=
tpapptestADHoc20181207
;
VERSIONING_SYSTEM
=
"apple-generic"
;
VERSIONING_SYSTEM
=
"apple-generic"
;
};
};
name
=
Release
;
name
=
Release
;
...
...
ios/BasicApp.xcodeproj/project.xcworkspace/xcuserdata/shiyunjie.xcuserdatad/UserInterfaceState.xcuserstate
View file @
33cc55e3
No preview for this file type
ios/BasicApp.xcodeproj/xcshareddata/xcschemes/BasicApp.xcscheme
View file @
33cc55e3
...
@@ -80,9 +80,9 @@
...
@@ -80,9 +80,9 @@
</AdditionalOptions>
</AdditionalOptions>
</TestAction>
</TestAction>
<LaunchAction
<LaunchAction
buildConfiguration =
"
Debug
"
buildConfiguration =
"
Release
"
selectedDebuggerIdentifier =
"
Xcode.DebuggerFoundation.Debugger.LLDB
"
selectedDebuggerIdentifier =
""
selectedLauncherIdentifier =
"Xcode.
DebuggerFoundation.Launcher.LLDB
"
selectedLauncherIdentifier =
"Xcode.
IDEFoundation.Launcher.PosixSpawn
"
launchStyle =
"0"
launchStyle =
"0"
useCustomWorkingDirectory =
"NO"
useCustomWorkingDirectory =
"NO"
ignoresPersistentStateOnLaunch =
"NO"
ignoresPersistentStateOnLaunch =
"NO"
...
...
ios/BasicApp/Info.plist
View file @
33cc55e3
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
<
plist
v
e
rsion="
1
.
0
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
en
<
/string
>
<
string
>
zh_CN
<
/string
>
<
k
e
y
>
CFBundleDisplayName
<
/k
e
y
>
<
k
e
y
>
CFBundleDisplayName
<
/k
e
y
>
<
string
>
{{
appName
}}
<
/string
>
<
string
>
Agera
<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
$
(
EXECUTABLE_NAME
)<
/string
>
<
string
>
$
(
EXECUTABLE_NAME
)<
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.0
<
/string
>
<
string
>
1.0
.0
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
k
e
y
>
NSLocationWhenInUseUsageDescription
<
/k
e
y
>
<
k
e
y
>
NSLocationWhenInUseUsageDescription
<
/k
e
y
>
<
string
><
/string
>
<
string
>
测试权限
<
/string
>
<
k
e
y
>
UIAppFonts
<
/k
e
y
>
<
k
e
y
>
UIAppFonts
<
/k
e
y
>
<
a
rr
a
y
>
<
a
rr
a
y
>
<
string
>
AntDesign.ttf
<
/string
>
<
string
>
AntDesign.ttf
<
/string
>
...
@@ -66,8 +66,6 @@
...
@@ -66,8 +66,6 @@
<
k
e
y
>
UISupportedInterfaceOrientations
<
/k
e
y
>
<
k
e
y
>
UISupportedInterfaceOrientations
<
/k
e
y
>
<
a
rr
a
y
>
<
a
rr
a
y
>
<
string
>
UIInterfaceOrientationPortrait
<
/string
>
<
string
>
UIInterfaceOrientationPortrait
<
/string
>
<
string
>
UIInterfaceOrientationLandscapeLeft
<
/string
>
<
string
>
UIInterfaceOrientationLandscapeRight
<
/string
>
<
/
a
rr
a
y
>
<
/
a
rr
a
y
>
<
k
e
y
>
UIViewControllerBasedStatusBarAppearance
<
/k
e
y
>
<
k
e
y
>
UIViewControllerBasedStatusBarAppearance
<
/k
e
y
>
<
fa
ls
e
/
>
<
fa
ls
e
/
>
...
...
src/BasicNavigator/navigationStack.js
View file @
33cc55e3
...
@@ -25,6 +25,7 @@ import RatingPage from '../pages/ratingDemo';
...
@@ -25,6 +25,7 @@ import RatingPage from '../pages/ratingDemo';
import
SliderPage
from
'../pages/sliderDemo'
;
import
SliderPage
from
'../pages/sliderDemo'
;
import
TooltipPage
from
'../pages/tooltipDemo'
;
import
TooltipPage
from
'../pages/tooltipDemo'
;
import
InsuranceDetail
from
'../pages/InsuranceList/InsuranceDetail'
;
import
InsuranceDetail
from
'../pages/InsuranceList/InsuranceDetail'
;
import
ProductDetailPage
from
'../pages/insurePage/ProductDetailPage'
;
import
{
initialRouteName
,
RootPageInitialName
}
from
'../utils/constants'
;
import
{
initialRouteName
,
RootPageInitialName
}
from
'../utils/constants'
;
import
{
TabOptions
}
from
'../components/TabOptions'
;
import
{
TabOptions
}
from
'../components/TabOptions'
;
...
@@ -132,6 +133,9 @@ const navigator = createStackNavigator({
...
@@ -132,6 +133,9 @@ const navigator = createStackNavigator({
InsuranceDetail
:
{
InsuranceDetail
:
{
screen
:
InsuranceDetail
,
screen
:
InsuranceDetail
,
},
},
ProductDetailPage
:
{
screen
:
ProductDetailPage
,
},
},
{
},
{
initialRouteName
,
initialRouteName
,
headerMode
:
'none'
,
headerMode
:
'none'
,
...
...
src/pages/Agera-App-Insure/config/index.js
0 → 100644
View file @
33cc55e3
// @flow
export
const
productDetail
=
'productDetail'
;
export
const
fillInfo
=
'fillInfo'
;
export
const
healthNotification
=
'healthNotification'
;
export
const
payment
=
'payment'
;
export
const
receipt
=
'receipt'
;
// layout type
export
const
BANNER
=
'banner'
;
export
const
TITLE
=
'title'
;
export
const
LIST_ITEM
=
'listItem'
;
export
const
CHOOSE
=
'choose'
;
const
initConfig
=
{
insuranceProcess
:
[
productDetail
,
fillInfo
,
healthNotification
,
payment
,
receipt
,
],
layout
:
[
{
type
:
BANNER
,
// 组件类型
key
:
BANNER
,
// 组件的唯一标识,用来串联 layout, rules
uri
:
''
,
// banner需要装填数据 uri,展示的图片链接
width
:
100
,
//图片宽度
height
:
100
,
// 图片高度
},
{
type
:
TITLE
,
key
:
TITLE
,
h1
:
''
,
// title需要装填数据 主标题
h2
:
''
,
// title需要装填数据 副标题
label
:
[],
// 多个展示标签
labelColor
:
''
,
//颜色
},
{
type
:
LIST_ITEM
,
key
:
LIST_ITEM
,
title
:
{
icon
:
''
,
//左侧icon
h1
:
''
,
//主标题
rightIcon
:
''
,
//右侧icon
rightText
:
''
,
//右侧文字
onPress
:
()
=>
{},
//点击事件
},
data
:
[{
key
:
''
,
value
:
''
}],
},
{
type
:
CHOOSE
,
key
:
CHOOSE
,
title
:
{
icon
:
''
,
//左侧icon
h1
:
''
,
//主标题
rightIcon
:
''
,
//右侧icon
rightText
:
''
,
//右侧文字
onPress
:
()
=>
{},
//点击事件
},
text
:
''
,
// 选择框显示标题
values
:
[],
// 选择框数据集合
source
:
{},
//修改源对象
setKey
:
''
,
//修改源对象内的属性名称
onChange
:
()
=>
{},
//选中事件
onWillChange
:
()
=>
{},
// 选中前执行事件
},
],
rules
:
[
{
layoutKey
:
CHOOSE
,
// 串联 key 为 choose的组件
range
:
[],
// [min , max] [a,b,c,d] 只允许包含在 a\b\c\d内
},
],
}
export
const
BaseConfig
=
{
'200000156'
:
initConfig
,
'200000155'
:
initConfig
,
'200000152'
:
initConfig
,
};
// 订单
export
type
Order
=
{
oid
:
string
,
// 唯一标识
orderno
:
string
,
// 订单号
uid
:
string
,
// 用户id
memberid
:
string
,
//关联关系,
channel
:
string
,
// 渠道
company
:
string
,
// 承保机构Id
orderstatus
:
string
,
//订单状态
ordertype
:
string
,
// 订单类型
orderprem
:
string
,
// 保费,用户付出的钱 元
orderamnt
:
string
,
// 保额,赔付的金额 元,
strmakedate
:
string
,
// 创建时间 年 月 日
invitecode
:
string
,
// 邀请号,
}
//支付信息
export
type
Payment
=
{
bankcode
:
string
,
// 银行编号
bankname
:
string
,
// 银行名称
name
:
string
,
// 开户名
bankaccount
:
string
,
// 银行账号
paymode
:
string
,
// 支付方式
payprem
:
string
,
// 支付金额
appmobile
:
string
,
// 联系方式
status
:
string
,
// 支付状态,
message
:
string
,
// 支付备注
strpaymentdate
:
string
,
// 开始支付时间
repaymode
:
string
,
//退款方式,
outpayflag
:
string
,
// 外部渠道标识,
}
//受益人
export
type
Bnf
=
{
bid
:
string
,
// 受益人id
bnftype
:
string
,
// 受益人类型 0 法定
bnfno
:
string
,
// 受益人编号
bnfgrade
:
string
,
//受益人级别
relationtoinsured
:
string
,
// 与被保人关系
bnflot
:
string
,
// 受益份额
sequenceno
:
string
,
//显示顺序
name
:
string
,
// 受益人名字
gender
:
string
,
// 性别
birthday
:
string
,
// 生日
idtype
:
string
,
// 证件类型
idno
:
string
,
// 证件号
isauthentication
:
string
,
//是否认证用户,
infrontimg
:
string
,
// 正面证件照片
inbackimg
:
string
,
// 反面证件照
nativeplace
:
string
,
// 籍贯
}
export
type
PDetail
=
{
province
:
string
,
//省编号
city
:
string
,
//市 编号
county
:
string
,
//区/县 编号
postaladdress
:
string
,
//详细地址
zipcode
:
string
,
//邮编
stature
:
string
,
//身高
avoirdupois
:
string
,
//体重
familyyearincome
:
string
,
//家庭收入
salary
:
string
,
//工资
mobile
:
string
,
//手机
phone
:
string
,
//固定电话
}
// 用户
export
type
Person
=
{
uid
:
string
,
//用户ID
name
:
string
,
//用户
gender
:
string
,
//性别,
birthday
:
string
,
//生日
idvalid
:
string
,
//实名认证
cardusefuldate
:
string
,
//证件有效期
idtype
:
string
,
//证件类型
idno
:
string
,
//证件号
nativeplace
:
string
,
//籍贯,
ssflag
:
string
,
//是否有社保,
infrontimg
:
string
,
// 证件照正面
inbackimg
:
string
,
// 证件照反面
currenttype
:
string
,
// 税收居民类型
detail
:
PDetail
,
// 通讯信息
}
//健告输入
export
type
Customerimpart
=
{
impartcode
:
string
,
// 健康告知项编号
impartver
:
string
,
// 健康告知项版本,
impartcontent
:
string
,
//告知内容
impartparams
:
string
,
// 用户输入信息,
impartexplanation
:
string
,
//输入参数,
}
// 投保人
export
type
Applicant
=
{
aid
:
string
,
// 唯一标识
orderId
:
Array
<
string
>
,
// 订单ID集合
ldperson
:
Person
,
//用户信息
lccustomerimpart
:
Array
<
Customerimpart
>
,
//健康告知
};
export
type
Insured
=
{
insureId
:
string
,
// 唯一标识
orderUUID
:
Array
<
string
>
,
// 订单ID集合
lcinsured
:
Person
,
//用户信息
lccustomerimpart
:
Array
<
Customerimpart
>
,
//健康告知
bnfs
:
Array
<
Bnf
>
,
//受益人
};
//险种计划,计划包含产品
export
type
Plan
=
{
pId
:
string
,
//唯一标识
prem
:
string
,
// 保费 元
amnt
:
string
,
// 保额 元,
products
:
Array
<
string
>
,
// 保险产品ID
contplancode
:
string
,
// 计划编号,
contplanname
:
string
,
// 计划名称,
mult
:
string
,
// 份数
payintv
:
string
,
// 缴费方式 12 年缴,1月缴,0趸缴
insuyear
:
string
,
//保障期间 106 终身,
insuyearflag
:
string
,
// 保障期间单位 Y 年 , A 岁,
payendyear
:
string
,
// 缴费期间
payendyearflag
:
string
,
// 缴费期间单位 Y 年 , A 岁,
hospitalbnfflag
:
string
,
// 是否有住院津贴 N;不选择Y:选择,
livegetmode
:
string
,
//生存金领取方式
deadgetmode
:
string
,
//身故金领取方式
bonusgetmode
:
string
,
//红利金领取方式
getyear
:
string
,
// 领取 年龄,
getyearflag
:
string
,
//领取 年龄标记 符合领取年龄 ,
getendperiod
:
string
,
// 领取年期,
getendunit
:
string
,
//领取年期 单位,
}
// 责任
export
type
Duty
=
{
dutycode
:
string
,
//责任编码
prem
:
string
,
//基本保费 用户付出的
amnt
:
string
,
//实际保额 赔付的
getlimit
:
string
,
//免赔天数
deductible
:
string
,
//免赔金额 元
getrate
:
string
,
//免赔比例
}
//保险产品
export
type
Product
=
{
productId
:
string
,
// 唯一标识
planids
:
Array
<
string
>
,
// 关联险种计划ID集合
polno
:
string
,
//保单险种号码
riskcode
:
string
,
//险种编码
riskname
:
string
,
//险种名称
ismainriskflag
:
string
,
//主附险标志
payintv
:
string
,
//缴费方式 12 年缴,1月缴,0趸缴
payendyearflag
:
string
,
//缴费期间
payendyear
:
string
,
//缴费期间单位 Y 年 , A 岁
insuyearflag
:
string
,
//保险年期单位
insuyear
:
string
,
//保险年期
amnt
:
string
,
//保额 赔付,
prem
:
string
,
//保费, 用户支付
mult
:
string
,
//份数,
getyear
:
string
,
//领取年龄
getintv
:
string
,
//年金领取频次
getendperiod
:
string
,
//领取期间,
getendunit
:
string
,
//领取期间单位,
livegetmode
:
string
,
//生存金领取方式
deadgetmode
:
string
,
//身故金领取方式,
bonusgetmode
:
string
,
//红利金领取方式
calflg
:
string
,
//保额报费计算方式 G保额算保费,P 保费算保额
pubamntflag
:
string
,
//是否公共保额 Y--是,N--否
pubamnt
:
string
,
//公共保额
dutys
:
Array
<
Duty
>
,
// 责任列表
discountsave
:
string
,
//折扣率
};
// 保单
export
type
Policy
=
{
pid
:
string
,
//唯一标识
order
:
Order
,
// 订单
payment
:
Payment
,
// 支付信息
applicant
:
Applicant
,
//投保人
insureds
:
Array
<
Insured
>
,
//被保人集合
bnfs
:
Array
<
Bnf
>
,
// 受益人
plans
:
Array
<
Plan
>
,
// 保险计划
// 目前的产品,products暂时不储存数据,所有产品数据储存在计划中
products
:
Array
<
Product
>
,
}
export
default
{};
src/pages/Agera-App-Insure/index.js
View file @
33cc55e3
...
@@ -3,16 +3,136 @@ import React from 'react';
...
@@ -3,16 +3,136 @@ import React from 'react';
import
{
import
{
View
,
View
,
}
from
'react-native'
;
}
from
'react-native'
;
import
FastImage
from
'react-native-fast-image'
;
import
Text
from
'../../components/Text'
;
import
Text
from
'../../components/Text'
;
import
{
BANNER
,
TITLE
,
LIST_ITEM
,
CHOOSE
,
}
from
'./config'
;
import
BasicIcon
from
"../../components/BasicIcon"
;
import
{
ListItem
}
from
"react-native-elements"
;
function
renderBanner
(
props
)
{
console
.
log
(
'renderBanner:'
,
props
);
return
(
<
FastImage
style
=
{{
width
:
props
.
width
,
height
:
props
.
height
}}
source
=
{{
uri
:
props
.
uri
,
priority
:
FastImage
.
priority
.
normal
,
}}
resizeMode
=
{
FastImage
.
resizeMode
.
stretch
}
/
>
);
}
function
renderPageByConfig
(
config
)
{
function
renderTitle
(
props
)
{
console
.
log
(
'renderTitle:'
,
props
);
return
(
return
(
<
View
>
<
View
<
Text
>
组件
<
/Text
>
style
=
{{
height
:
props
.
height
||
100
,
paddingLeft
:
15
,
}}
>
<
Text
style
=
{{
color
:
'#333'
,
fontSize
:
18
,
marginTop
:
15
,
}}
>
{
props
.
h1
}
<
/Text
>
<
Text
style
=
{{
marginTop
:
10
,
color
:
'#999'
,
fontSize
:
13
,
}}
>
{
props
.
h2
}
<
/Text
>
<
View
style
=
{{
flexDirection
:
'row'
,
alignItems
:
'center'
,
paddingTop
:
9
,
}}
>
{
props
.
label
.
map
((
item
,
index
)
=>
(
<
View
style
=
{{
borderColor
:
props
.
labelColor
,
borderWidth
:
1
,
marginRight
:
10
,
}}
>
<
Text
style
=
{{
color
:
props
.
labelColor
,
}}
>
{
item
}
<
/Text
>
<
/View
>
))
}
<
/View
>
<
/View
>
<
/View
>
);
);
}
}
function
renderListItem
(
props
)
{
return
(
<
View
>
{
<
ListItem
key
=
{
`renderListItem
${
index
}
`
}
containerStyle
=
{{
borderBottomWidth
:
index
<
props
.
data
.
length
-
1
?
0.3
:
0
,
borderBottomColor
:
'#ccc'
,
}}
title
=
{
item
.
title
}
titleStyle
=
{{
color
:
'#666'
,
fontSize
:
14
}}
leftElement
=
{(
<
FastImage
style
=
{{
width
:
24
,
height
:
24
}}
source
=
{{
uri
:
item
.
imgUrl
,
priority
:
FastImage
.
priority
.
normal
,
}}
resizeMode
=
{
FastImage
.
resizeMode
.
stretch
}
/
>
)}
rightElement
=
{(
<
BasicIcon
suite
=
"Ionicons"
name
=
"ios-arrow-forward"
size
=
{
24
}
color
=
"#666"
/>
)}
/>
}
<
/View
>
)
}
export
function
renderPageByConfig
(
config
,
renderCustomView
?)
{
switch
(
config
.
type
)
{
case
BANNER
:
return
renderBanner
;
case
TITLE
:
return
renderTitle
;
case
LIST_ITEM
:
return
renderListItem
;
case
CHOOSE
:
default
:
return
()
=>
{
// 有自定义方法执行传入的渲染方法
if
(
renderCustomView
)
{
renderCustomView
(
config
);
}
};
}
}
export
default
{
export
default
{
renderPageByConfig
,
renderPageByConfig
,
...
...
src/pages/home/home.json
View file @
33cc55e3
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
"title"
:
""
,
"title"
:
""
,
"data"
:
[
"data"
:
[
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/dawanqu1.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/dawanqu1.png"
,
"tagUrl"
:
"https://mp.weixin.qq.com/s/IUlnN-Yh12reG96WlMCCgQ"
,
"tagUrl"
:
"https://mp.weixin.qq.com/s/IUlnN-Yh12reG96WlMCCgQ"
,
"pageType"
:
"HTML"
,
"pageType"
:
"HTML"
,
"authorization"
:
""
,
"authorization"
:
""
,
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
"icon"
:
""
"icon"
:
""
},
},
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/tuangou1.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/tuangou1.png"
,
"tagUrl"
:
"http://mall.itaiping.com/itaiping-mobile/activityPage.html?activityIndex=0&activitySign=tuangou"
,
"tagUrl"
:
"http://mall.itaiping.com/itaiping-mobile/activityPage.html?activityIndex=0&activitySign=tuangou"
,
"pageType"
:
"HTML"
,
"pageType"
:
"HTML"
,
"authorization"
:
""
,
"authorization"
:
""
,
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
"icon"
:
""
"icon"
:
""
},
},
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/ttcjbanner.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/ttcjbanner.png"
,
"tagUrl"
:
"34"
,
"tagUrl"
:
"34"
,
"pageType"
:
"RN"
,
"pageType"
:
"RN"
,
"authorization"
:
""
,
"authorization"
:
""
,
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
"icon"
:
""
"icon"
:
""
},
},
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/banner04.jpg"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/banner04.jpg"
,
"tagUrl"
:
""
,
"tagUrl"
:
""
,
"pageType"
:
""
,
"pageType"
:
""
,
"authorization"
:
""
,
"authorization"
:
""
,
...
@@ -68,7 +68,7 @@
...
@@ -68,7 +68,7 @@
"title"
:
""
,
"title"
:
""
,
"data"
:
[
"data"
:
[
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/icon_service_wodebaodan.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/icon_service_wodebaodan.png"
,
"tagUrl"
:
"InsuranceList"
,
"tagUrl"
:
"InsuranceList"
,
"pageType"
:
"native"
,
"pageType"
:
"native"
,
"authorization"
:
"1"
,
"authorization"
:
"1"
,
...
@@ -81,7 +81,7 @@
...
@@ -81,7 +81,7 @@
"icon"
:
""
"icon"
:
""
},
},
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/icon_service_baoan.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/icon_service_baoan.png"
,
"tagUrl"
:
"23"
,
"tagUrl"
:
"23"
,
"pageType"
:
"RN"
,
"pageType"
:
"RN"
,
"authorization"
:
""
,
"authorization"
:
""
,
...
@@ -94,7 +94,7 @@
...
@@ -94,7 +94,7 @@
"icon"
:
""
"icon"
:
""
},
},
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/icon_service_toubaojincheng.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/icon_service_toubaojincheng.png"
,
"tagUrl"
:
"ClaimSearch"
,
"tagUrl"
:
"ClaimSearch"
,
"pageType"
:
"native"
,
"pageType"
:
"native"
,
"authorization"
:
"1"
,
"authorization"
:
"1"
,
...
@@ -107,20 +107,20 @@
...
@@ -107,20 +107,20 @@
"icon"
:
""
"icon"
:
""
},
},
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/icon_service_shishidai.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/icon_service_shishidai.png"
,
"tagUrl"
:
"22"
,
"tagUrl"
:
"22"
,
"pageType"
:
"RN"
,
"pageType"
:
"RN"
,
"authorization"
:
"1"
,
"authorization"
:
"1"
,
"login"
:
"1"
,
"login"
:
"1"
,
"title"
:
"实时贷"
,
"title"
:
"实时贷"
,
"detail"
:
"menu=service&banner=http
://58.49.129.4
/static/rn/src/img/pic_shishidai_banner2.png&content=借款人(保险服务密码所有人)以在太平人寿保险有限公司所持有的可借款保险合同的现金价值为质,同意开通“实时货”业务并在“实时货”业务有效期内可向保险公司申请借、还款。
\n
注:货款时,仅支持投、被保人均为本人及投保人为本人、协议签订及申请借款时被保人为未成年人的保单。
\n
"
,
"detail"
:
"menu=service&banner=http
s://ecustomer.tp95589.com
/static/rn/src/img/pic_shishidai_banner2.png&content=借款人(保险服务密码所有人)以在太平人寿保险有限公司所持有的可借款保险合同的现金价值为质,同意开通“实时货”业务并在“实时货”业务有效期内可向保险公司申请借、还款。
\n
注:货款时,仅支持投、被保人均为本人及投保人为本人、协议签订及申请借款时被保人为未成年人的保单。
\n
"
,
"titleColor"
:
"#333333"
,
"titleColor"
:
"#333333"
,
"detailColor"
:
""
,
"detailColor"
:
""
,
"badge"
:
""
,
"badge"
:
""
,
"icon"
:
""
"icon"
:
""
},
},
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/icon_service_huizhihuifang.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/icon_service_huizhihuifang.png"
,
"tagUrl"
:
"Receipt"
,
"tagUrl"
:
"Receipt"
,
"pageType"
:
"native"
,
"pageType"
:
"native"
,
"authorization"
:
"1"
,
"authorization"
:
"1"
,
...
@@ -133,7 +133,7 @@
...
@@ -133,7 +133,7 @@
"icon"
:
""
"icon"
:
""
},
},
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/icon_service_baodanxuqijiaofei.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/icon_service_baodanxuqijiaofei.png"
,
"tagUrl"
:
"RenewalPolicy"
,
"tagUrl"
:
"RenewalPolicy"
,
"pageType"
:
"native"
,
"pageType"
:
"native"
,
"authorization"
:
"1"
,
"authorization"
:
"1"
,
...
@@ -146,7 +146,7 @@
...
@@ -146,7 +146,7 @@
"icon"
:
""
"icon"
:
""
},
},
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/icon_service_wodebaozhang.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/icon_service_wodebaozhang.png"
,
"tagUrl"
:
"AssetList"
,
"tagUrl"
:
"AssetList"
,
"pageType"
:
"native"
,
"pageType"
:
"native"
,
"authorization"
:
"1"
,
"authorization"
:
"1"
,
...
@@ -159,7 +159,7 @@
...
@@ -159,7 +159,7 @@
"icon"
:
""
"icon"
:
""
},
},
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/icon_service_tuanxianlipeishenqing.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/icon_service_tuanxianlipeishenqing.png"
,
"tagUrl"
:
"21"
,
"tagUrl"
:
"21"
,
"pageType"
:
"RN"
,
"pageType"
:
"RN"
,
"authorization"
:
"1"
,
"authorization"
:
"1"
,
...
@@ -184,7 +184,7 @@
...
@@ -184,7 +184,7 @@
"title"
:
"活动"
,
"title"
:
"活动"
,
"data"
:
[
"data"
:
[
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/pic_banner_activity_invite6.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/pic_banner_activity_invite6.png"
,
"tagUrl"
:
"29"
,
"tagUrl"
:
"29"
,
"pageType"
:
"RN"
,
"pageType"
:
"RN"
,
"authorization"
:
""
,
"authorization"
:
""
,
...
@@ -197,7 +197,7 @@
...
@@ -197,7 +197,7 @@
"icon"
:
""
"icon"
:
""
},
},
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/zhouzhoule.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/zhouzhoule.png"
,
"tagUrl"
:
"34"
,
"tagUrl"
:
"34"
,
"pageType"
:
"RN"
,
"pageType"
:
"RN"
,
"authorization"
:
""
,
"authorization"
:
""
,
...
@@ -210,7 +210,7 @@
...
@@ -210,7 +210,7 @@
"icon"
:
""
"icon"
:
""
},
},
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/pic_banner_activity_running6.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/pic_banner_activity_running6.png"
,
"tagUrl"
:
"30"
,
"tagUrl"
:
"30"
,
"pageType"
:
"RN"
,
"pageType"
:
"RN"
,
"authorization"
:
""
,
"authorization"
:
""
,
...
@@ -223,7 +223,7 @@
...
@@ -223,7 +223,7 @@
"icon"
:
""
"icon"
:
""
},
},
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/qiandaoyoujiang.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/qiandaoyoujiang.png"
,
"tagUrl"
:
"26"
,
"tagUrl"
:
"26"
,
"pageType"
:
"RN"
,
"pageType"
:
"RN"
,
"authorization"
:
""
,
"authorization"
:
""
,
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
"title"
:
"增值服务"
,
"title"
:
"增值服务"
,
"data"
:
[
"data"
:
[
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/pic_home_shop_huiyuan2.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/pic_home_shop_huiyuan2.png"
,
"tagUrl"
:
"http://sit1.tp95589.com/healthCenterWeb/#/index?firstVC=1"
,
"tagUrl"
:
"http://sit1.tp95589.com/healthCenterWeb/#/index?firstVC=1"
,
"pageType"
:
"HTML"
,
"pageType"
:
"HTML"
,
"authorization"
:
""
,
"authorization"
:
""
,
...
@@ -261,7 +261,7 @@
...
@@ -261,7 +261,7 @@
"icon"
:
""
"icon"
:
""
},
},
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/pic_home_shop_haiwai2.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/pic_home_shop_haiwai2.png"
,
"tagUrl"
:
"http://smarket.tp95589.com/itaiping-mobile/voucherCenter/index?firstVC=1"
,
"tagUrl"
:
"http://smarket.tp95589.com/itaiping-mobile/voucherCenter/index?firstVC=1"
,
"pageType"
:
"HTML"
,
"pageType"
:
"HTML"
,
"authorization"
:
""
,
"authorization"
:
""
,
...
@@ -274,7 +274,7 @@
...
@@ -274,7 +274,7 @@
"icon"
:
""
"icon"
:
""
},
},
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/pic_home_shop_fupin2.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/pic_home_shop_fupin2.png"
,
"tagUrl"
:
"http://smarket.tp95589.com/itaiping-mobile/scoreService.html?firstVC=1"
,
"tagUrl"
:
"http://smarket.tp95589.com/itaiping-mobile/scoreService.html?firstVC=1"
,
"pageType"
:
"HTML"
,
"pageType"
:
"HTML"
,
"authorization"
:
""
,
"authorization"
:
""
,
...
...
src/pages/home/service.json
View file @
33cc55e3
This diff is collapsed.
Click to expand it.
src/pages/home/user.json
View file @
33cc55e3
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
"title"
:
""
,
"title"
:
""
,
"data"
:
[
"data"
:
[
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/icon_bd_baozhangzhong3.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/icon_bd_baozhangzhong3.png"
,
"tagUrl"
:
"InsuranceList"
,
"tagUrl"
:
"InsuranceList"
,
"pageType"
:
"native"
,
"pageType"
:
"native"
,
"authorization"
:
"1"
,
"authorization"
:
"1"
,
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
"icon"
:
""
"icon"
:
""
},
},
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/icon_bd_yizhongzhi3.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/icon_bd_yizhongzhi3.png"
,
"tagUrl"
:
"InsuranceList"
,
"tagUrl"
:
"InsuranceList"
,
"pageType"
:
"native"
,
"pageType"
:
"native"
,
"authorization"
:
"1"
,
"authorization"
:
"1"
,
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
"icon"
:
""
"icon"
:
""
},
},
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/icon_sc_wodebaodan3.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/icon_sc_wodebaodan3.png"
,
"tagUrl"
:
"InsuranceList"
,
"tagUrl"
:
"InsuranceList"
,
"pageType"
:
"native"
,
"pageType"
:
"native"
,
"authorization"
:
"1"
,
"authorization"
:
"1"
,
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
"icon"
:
""
"icon"
:
""
},
},
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/icon_sc_gouwuche3.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/icon_sc_gouwuche3.png"
,
"tagUrl"
:
"http://smarket.tp95589.com/itaiping-mobile/myCart?firstVC=1"
,
"tagUrl"
:
"http://smarket.tp95589.com/itaiping-mobile/myCart?firstVC=1"
,
"pageType"
:
"HTML"
,
"pageType"
:
"HTML"
,
"authorization"
:
""
,
"authorization"
:
""
,
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
"icon"
:
""
"icon"
:
""
},
},
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/icon_sc_daifukuan3.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/icon_sc_daifukuan3.png"
,
"tagUrl"
:
"http://itaiping.tp95589.com/mobile/userCenter/myOrder.html?status=1&firstVC=1"
,
"tagUrl"
:
"http://itaiping.tp95589.com/mobile/userCenter/myOrder.html?status=1&firstVC=1"
,
"pageType"
:
"HTML"
,
"pageType"
:
"HTML"
,
"authorization"
:
""
,
"authorization"
:
""
,
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
"icon"
:
""
"icon"
:
""
},
},
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/icon_sc_dingdan3.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/icon_sc_dingdan3.png"
,
"tagUrl"
:
"http://itaiping.tp95589.com/mobile/userCenter/myOrder.html?firstVC=1"
,
"tagUrl"
:
"http://itaiping.tp95589.com/mobile/userCenter/myOrder.html?firstVC=1"
,
"pageType"
:
"HTML"
,
"pageType"
:
"HTML"
,
"authorization"
:
""
,
"authorization"
:
""
,
...
@@ -94,7 +94,7 @@
...
@@ -94,7 +94,7 @@
"title"
:
"会员权益"
,
"title"
:
"会员权益"
,
"data"
:
[
"data"
:
[
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/icon_vip_task3.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/icon_vip_task3.png"
,
"tagUrl"
:
"24"
,
"tagUrl"
:
"24"
,
"pageType"
:
"RN"
,
"pageType"
:
"RN"
,
"authorization"
:
""
,
"authorization"
:
""
,
...
@@ -107,7 +107,7 @@
...
@@ -107,7 +107,7 @@
"icon"
:
""
"icon"
:
""
},
},
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/icon_vip_coupon3.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/icon_vip_coupon3.png"
,
"tagUrl"
:
"MyCoupon"
,
"tagUrl"
:
"MyCoupon"
,
"pageType"
:
"native"
,
"pageType"
:
"native"
,
"authorization"
:
""
,
"authorization"
:
""
,
...
@@ -120,7 +120,7 @@
...
@@ -120,7 +120,7 @@
"icon"
:
""
"icon"
:
""
},
},
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/icon_vip_invite3.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/icon_vip_invite3.png"
,
"tagUrl"
:
"29"
,
"tagUrl"
:
"29"
,
"pageType"
:
"RN"
,
"pageType"
:
"RN"
,
"authorization"
:
""
,
"authorization"
:
""
,
...
@@ -133,7 +133,7 @@
...
@@ -133,7 +133,7 @@
"icon"
:
""
"icon"
:
""
},
},
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/yueyuechoujiang.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/yueyuechoujiang.png"
,
"tagUrl"
:
"34"
,
"tagUrl"
:
"34"
,
"pageType"
:
"RN"
,
"pageType"
:
"RN"
,
"authorization"
:
""
,
"authorization"
:
""
,
...
@@ -158,7 +158,7 @@
...
@@ -158,7 +158,7 @@
"title"
:
""
,
"title"
:
""
,
"data"
:
[
"data"
:
[
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/icon_mine_conacts3.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/icon_mine_conacts3.png"
,
"tagUrl"
:
"PersonInfo"
,
"tagUrl"
:
"PersonInfo"
,
"pageType"
:
"native"
,
"pageType"
:
"native"
,
"authorization"
:
""
,
"authorization"
:
""
,
...
@@ -171,7 +171,7 @@
...
@@ -171,7 +171,7 @@
"icon"
:
""
"icon"
:
""
},
},
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/icon_mine_safe3.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/icon_mine_safe3.png"
,
"tagUrl"
:
"SecurityCenter"
,
"tagUrl"
:
"SecurityCenter"
,
"pageType"
:
"native"
,
"pageType"
:
"native"
,
"authorization"
:
""
,
"authorization"
:
""
,
...
@@ -184,7 +184,7 @@
...
@@ -184,7 +184,7 @@
"icon"
:
""
"icon"
:
""
},
},
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/icon_mine_information3.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/icon_mine_information3.png"
,
"tagUrl"
:
"Feedback"
,
"tagUrl"
:
"Feedback"
,
"pageType"
:
"native"
,
"pageType"
:
"native"
,
"authorization"
:
""
,
"authorization"
:
""
,
...
@@ -197,7 +197,7 @@
...
@@ -197,7 +197,7 @@
"icon"
:
""
"icon"
:
""
},
},
{
{
"imgUrl"
:
"http
://58.49.129.4
/static/rn/src/img/icon_mine_information3.png"
,
"imgUrl"
:
"http
s://ecustomer.tp95589.com
/static/rn/src/img/icon_mine_information3.png"
,
"tagUrl"
:
"HelpCenter"
,
"tagUrl"
:
"HelpCenter"
,
"pageType"
:
"native"
,
"pageType"
:
"native"
,
"authorization"
:
""
,
"authorization"
:
""
,
...
...
src/pages/insurePage/ProductDetailPage.js
View file @
33cc55e3
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow
*/
import
React
,
{
Component
}
from
'react'
;
import
{
View
,
}
from
'react-native'
;
import
{
compose
}
from
'redux'
;
import
{
connect
}
from
'react-redux'
;
import
{
SpringScrollView
}
from
'react-native-spring-scrollview'
;
import
{
CommonLottieHeader
}
from
'react-native-spring-scrollview/Customize/CommonLottieHeader'
;
import
{
pop
}
from
'../../BasicNavigator/actions'
;
import
NavigationBar
from
'../../components/NavigationBar'
;
import
BackButton
from
'../../components/BackButton'
;
import
Styles
from
'../../theme/Styles'
;
import
decorator
from
'../../utils/decorator'
;
import
{
BANNER
,
CHOOSE
,
BaseConfig
,
LIST_ITEM
,
TITLE
,
}
from
'../Agera-App-Insure/config'
;
import
{
renderPageByConfig
}
from
'../Agera-App-Insure'
;
type
Props
=
{
routes
:
Array
,
popTo
:
()
=>
void
,
blueId
:
string
,
};
@
decorator
class
ProductDetailPage
extends
Component
{
constructor
(
props
:
Props
)
{
super
(
props
);
/* {
blueId: '200000156',
company: 'PROPERTY',
iconUrl: 'https://ecustomer.tp95589.com/static/insurance_img/201906/03/1babf50701374e79b2d0e1758d7e6d42.png',
detail: {
name: '“驾乘至尊宝”驾乘人员人身意外综合保险',
description: '不限被保险人、最高50万保障',
detailsPageWxshareUrl: '',
guaranteeContent: '[{"text":[{"name":"驾乘意外身故、残疾","value":"25万元/份"},{"name":"驾乘意外伤害医疗","value":"1万元/份"}]},{"text":[{"name":"驾乘意外身故、残疾","value":"50万元/份"},{"name":"驾乘意外伤害医疗","value":"3万元/份"}]}]',
bannerIconUrl: 'https://ecustomer.tp95589.com/static/insurance_img/201901/01/dbf8648cdca04b20af889f07e3938b5f.png',
productIntroductionUrl: 'https://ecustomer.tp95589.com/static/insurance_img/201906/11/1755eb7f49934157b6fc65f09ef9015a.png',
serviceProcessUrl: 'https://ecustomer.tp95589.com/static/insurance_img/201906/11/2c0eb0145bf1498bb677897a8b03b179.png',
importantNotificationUrl: '',
tagNameList: [
'1-75周岁',
],
},
}*/
const
pageConfig
=
BaseConfig
[
props
.
navigation
.
state
.
params
.
blueId
];
const
{
params
}
=
props
.
navigation
.
state
;
pageConfig
.
layout
.
forEach
((
lay
,
index
)
=>
{
console
.
log
(
lay
);
const
data
=
this
.
translateDataToConfig
(
lay
,
params
);
pageConfig
.
layout
[
index
]
=
{
...
lay
,
...
data
};
});
this
.
state
=
{
params
,
config
:
pageConfig
,
};
console
.
log
(
'ProductDetailPage'
,
this
.
state
);
}
translateDataToConfig
=
(
lay
,
params
)
=>
{
const
{
name
,
description
,
tagNameList
,
bannerIconUrl
}
=
params
.
detail
switch
(
lay
.
type
)
{
case
BANNER
:
return
{
uri
:
bannerIconUrl
,
width
:
global
.
SCREEN_WIDTH
,
height
:
global
.
SCREEN_WIDTH
*
180
/
375
,
};
case
TITLE
:
return
{
h1
:
name
,
// title需要装填数据 主标题
h2
:
description
,
// title需要装填数据 副标题
label
:
tagNameList
,
// 多个展示标签
labelColor
:
'#cf4100'
,
//颜色
};
case
LIST_ITEM
:
return
{};
case
CHOOSE
:
return
{};
default
:
return
{};
}
}
translateDataToRules
=
(
lay
,
rul
,
params
)
=>
{
switch
(
lay
.
type
)
{
case
BANNER
:
return
{};
case
TITLE
:
return
{};
case
LIST_ITEM
:
return
{};
case
CHOOSE
:
return
{};
default
:
return
{};
}
}
render
()
{
const
{
config
}
=
this
.
state
return
(
<
View
style
=
{
Styles
.
container
}
>
<
NavigationBar
left
=
{
<
BackButton
/>
}
title
=
"太平保险"
/>
<
SpringScrollView
ref
=
{(
com
)
=>
(
this
.
scrollView
=
com
)}
styles
=
{
Styles
.
container
}
inverted
=
{
false
}
//onRefresh={this._onRefresh}
//onLoading={this._onLoading}
// allLoaded={this.state.allLoaded}
refreshHeader
=
{
CommonLottieHeader
}
//loadingFooter={CommonLottieFooter}
>
{
config
.
layout
.
map
((
lay
,
index
)
=>
(
renderPageByConfig
(
lay
)(
lay
)
))}
<
/SpringScrollView
>
<
/View
>
);
}
}
function
propsMapping
(
props
)
{
const
{
nav
}
=
props
;
return
{
routes
:
nav
?
nav
.
routes
:
[],
};
}
function
actionMapping
(
dispatch
)
{
return
{
popTo
:
compose
(
dispatch
,
pop
),
};
}
export
default
connect
(
propsMapping
,
actionMapping
)(
ProductDetailPage
);
src/utils/api/localData.js
View file @
33cc55e3
...
@@ -26,7 +26,7 @@ export default {
...
@@ -26,7 +26,7 @@ export default {
nextDate
:
'2020年7月2日'
,
nextDate
:
'2020年7月2日'
,
birthday
:
'1980年1月1日'
,
birthday
:
'1980年1月1日'
,
gender
:
'男'
,
gender
:
'男'
,
id
n
o
:
'31029******7792'
,
id
N
o
:
'31029******7792'
,
mobile
:
'18588880005'
,
mobile
:
'18588880005'
,
},
},
{
{
...
@@ -47,7 +47,7 @@ export default {
...
@@ -47,7 +47,7 @@ export default {
nextDate
:
'2020年5月12日'
,
nextDate
:
'2020年5月12日'
,
birthday
:
'1980年1月1日'
,
birthday
:
'1980年1月1日'
,
gender
:
'男'
,
gender
:
'男'
,
id
n
o
:
'31029******7792'
,
id
N
o
:
'31029******7792'
,
mobile
:
'18588880005'
,
mobile
:
'18588880005'
,
},
},
],
],
...
@@ -78,34 +78,36 @@ export default {
...
@@ -78,34 +78,36 @@ export default {
company
:
'PENSION'
,
company
:
'PENSION'
,
iconUrl
:
'https://ecustomer.tp95589.com/static/insurance_img/201906/03/fd0db92ce55645b3b00c4035d25902c7.png'
,
iconUrl
:
'https://ecustomer.tp95589.com/static/insurance_img/201906/03/fd0db92ce55645b3b00c4035d25902c7.png'
,
detail
:
{
detail
:
{
name
:
'“
驾乘至尊宝”驾乘人员人身意外综合保险
'
,
name
:
'“
爱飞翔”航空意外保险计划
'
,
description
:
'
不限被保险人、最高50万
保障'
,
description
:
'
3.99元震撼低价、全年100万元
保障'
,
detailsPageWxshareUrl
:
''
,
detailsPageWxshareUrl
:
''
,
guaranteeContent
:
'[{"text":[{"name":"
驾乘意外身故、残疾","value":"25万元/份"},{"name":"驾乘意外伤害医疗","value":"1万元/份"}]},{"text":[{"name":"驾乘意外身故、残疾","value":"50万元/份"},{"name":"驾乘意外伤害医疗","value":"3
万元/份"}]}]'
,
guaranteeContent
:
'[{"text":[{"name":"
航空意外身故、伤残","value":"100
万元/份"}]}]'
,
bannerIconUrl
:
'https://ecustomer.tp95589.com/static/insurance_img/201901/01/
dbf8648cdca04b20af889f07e3938b5f
.png'
,
bannerIconUrl
:
'https://ecustomer.tp95589.com/static/insurance_img/201901/01/
340dc870750b41e492ac9ee88b5aae2a
.png'
,
productIntroductionUrl
:
'https://ecustomer.tp95589.com/static/insurance_img/201906/1
1/1755eb7f49934157b6fc65f09ef9015a
.png'
,
productIntroductionUrl
:
'https://ecustomer.tp95589.com/static/insurance_img/201906/1
2/be5dfbf9afc74ef99fdc39bef66ef292
.png'
,
serviceProcessUrl
:
'https://ecustomer.tp95589.com/static/insurance_img/201906/1
1/2c0eb0145bf1498bb677897a8b03b179
.png'
,
serviceProcessUrl
:
'https://ecustomer.tp95589.com/static/insurance_img/201906/1
2/be5dfbf9afc74ef99fdc39bef66ef292
.png'
,
importantNotificationUrl
:
''
,
importantNotificationUrl
:
'
https://ecustomer.tp95589.com/static/insurance_img/201906/12/438000682508403caf62a15878c9416d.png
'
,
tagNameList
:
[
tagNameList
:
[
'1-75周岁'
,
'超低价'
,
'0-80周岁'
,
],
],
},
},
},
},
{
{
blueId
:
'200000152'
,
blueId
:
'200000152'
,
company
:
'LIFE'
,
company
:
'LIFE'
,
iconUrl
:
'https://ecustomer.tp95589.com/static/insurance_img/201906/
03/dac832df067341aa958e417b909573c9
.png'
,
iconUrl
:
'https://ecustomer.tp95589.com/static/insurance_img/201906/
14/9933f8eb198f4e9b9c72bc3ef1a867d6
.png'
,
detail
:
{
detail
:
{
name
:
'
“驾乘至尊宝”驾乘人员人身意外综合保
险'
,
name
:
'
学生住院医疗&意外
险'
,
description
:
'
不限被保险人、最高50万保障
'
,
description
:
'
疾病住院、意外医疗多重保障,最高享6万元住院医疗
'
,
detailsPageWxshareUrl
:
''
,
detailsPageWxshareUrl
:
''
,
guaranteeContent
:
'[{"text":
[{"name":"驾乘意外身故、残疾","value":"25万元/份"},{"name":"驾乘意外伤害医疗","value":"1万元/份"}]},{"text":[{"name":"驾乘意外身故、残疾","value":"50万元/份"},{"name":"驾乘意外伤害医疗","value":"3
万元/份"}]}]'
,
guaranteeContent
:
'[{"text":
[{"name":"住院医疗", "value":"6万元/份"},{"name":"意外医疗","value":"5000元/份"},{"name":"意外身故","value":"5万元/份"},{"name":"意外残疾","value":"5
万元/份"}]}]'
,
bannerIconUrl
:
'https://ecustomer.tp95589.com/static/insurance_img/20190
1/01/dbf8648cdca04b20af889f07e3938b5f
.png'
,
bannerIconUrl
:
'https://ecustomer.tp95589.com/static/insurance_img/20190
6/12/8cffbf808b584ff6b0a4fa3082c151d2
.png'
,
productIntroductionUrl
:
'https://ecustomer.tp95589.com/static/insurance_img/20190
6/11/1755eb7f49934157b6fc65f09ef9015a
.png'
,
productIntroductionUrl
:
'https://ecustomer.tp95589.com/static/insurance_img/20190
5/06/500622b8641c46eeadf0a8cf6460ba04
.png'
,
serviceProcessUrl
:
'https://ecustomer.tp95589.com/static/insurance_img/20190
6/11/2c0eb0145bf1498bb677897a8b03b179
.png'
,
serviceProcessUrl
:
'https://ecustomer.tp95589.com/static/insurance_img/20190
5/06/b51ca9e95aab49cc8bb44fe8eda16583
.png'
,
importantNotificationUrl
:
''
,
importantNotificationUrl
:
'
https://ecustomer.tp95589.com/static/insurance_img/201905/06/97de2b11f574471facbe4577b97c3879.png
'
,
tagNameList
:
[
tagNameList
:
[
'1-75周岁'
,
'5-16周岁'
,
'学生专享'
,
],
],
},
},
},
},
...
...
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