Last active
May 15, 2016 08:14
-
-
Save bingluen/70c34a3c903ca32c95ecdbb0b11128e1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "金融商品名稱" | |
"tag": ["醫療型", "回本型"] //這邊應該要定義成enum的數字,而不是字串 | |
// 1:"投資型保單",2:"外幣型保單",3:"保障型保單",4:"死亡給付",5:"全殘給付",6:"醫療給付",7:"分紅保單" | |
"content": "商品介紹內文" | |
"graphic": [ | |
//這邊以剛剛說的南山作為例子 | |
{ | |
"index": 0 //畫圖的順序 | |
"incomePeriod": 20, //持續幾次,若這裡填20,而incomeFrequency填0 表示持續20年 | |
"expenditurePeriod": 6, //持續幾次,若這裡填6,而expenditurePeriod填0 表示持續6年 | |
"incomeFrequency": 0, //每年(0),每季(1),每月(2),無(3) 四種數字 | |
"expenditureFrequency": 0, //每年(0),每季(1),每月(2),無(3) 四種數字 | |
"income": 864, | |
"expenditure": 55150 | |
}, | |
{ | |
"index": 1 //畫圖的順序 | |
"incomePeriod": 0, //持續幾次,而incomeFrequency填3 這裡直接被忽略 | |
"expenditurePeriod": 0, //持續幾次,而expenditurePeriod填3 這裡直接被忽略 | |
"incomeFrequency": 3, //每年(0),每季(1),每月(2),無(3) 四種數字 | |
"expenditureFrequency": 3, //每年(0),每季(1),每月(2),無(3) 四種數字 | |
"income": 200000, //假設解約後領回本金 | |
"expenditure": 0 | |
} | |
] | |
} | |
/* | |
此時的繪製順序會是 | |
找index 0 -> 先畫出支出部分 -> 第1~6年畫出支出 | |
-> 再畫出收入部分 -> 第7~20年畫出收入 | |
找index 1 -> 先畫出支出部分 -> (支出為0,忽略不畫) | |
-> 再畫出收入部分 -> 第21年畫上收入 | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment