diff --git a/components/cl-tabbar.vue b/components/cl-tabbar.vue index a5961b1..520705a 100644 --- a/components/cl-tabbar.vue +++ b/components/cl-tabbar.vue @@ -30,7 +30,7 @@ src="@/static/images/one2.png" > - + - + - - -
-
- -
-
{{ treeObj.actName }}
- -
-
- - - {{ '种植' }} - - - {{ '数量' }}: - - - - {{ '公益金' }}: - ¥{{ treeObj.amount | numberToCurrency }} - - - {{ '确定' }} - - -
- - - - - diff --git a/config/bonus.js b/config/bonus.js index 3d289ea..543418e 100644 --- a/config/bonus.js +++ b/config/bonus.js @@ -1,15 +1,22 @@ - const http = uni.$u.http - // 登录 -export const queryBonusTotal = (data) => http.post('/bonus/api/bonus/query-bonus-total', data) +export const queryBonusTotal = data => + http.post('/bonus/api/bonus/query-bonus-total', data) //新人礼包详情 -export const getGiftPack = (data) => http.post('/activity/api/people-service/getGiftPack', data) +export const getGiftPack = data => + http.post('/activity/api/people-service/getGiftPack', data) //注册等级下拉选 -export const getGradeList = (params) => http.get('/system/api/grade/list', { - params -}) +export const getGradeList = params => + http.get('/system/api/grade/list', { + params, + }) //三单轮次 -export const nextRound = (params) => http.get('/member/api/market-news/round-his', {params}) \ No newline at end of file +export const nextRound = params => + http.get('/member/api/market-news/round-his', { params }) + +// 实时奖金 + +export const realTimeBonus = () => + http.post('/bonus/api/bonus/query-current-bonus') diff --git a/config/index.js b/config/index.js index 6c63687..bfbb4b8 100644 --- a/config/index.js +++ b/config/index.js @@ -11,10 +11,7 @@ export const pickList = params => //提货专区列表 export const pickLogList = params => http.get('/activity/api/pick/pick-log', { params }) -//植树活动 -export const queryTreeActivity = params => - http.get('/activity/api/sa-tree-order/queryTreeActivity', { params }) -//创客空间列表 -export const marketList = params => - http.get('/member/api/maker-space/list', { params }) +// banner +export const getBanners = () => + http.get('/home/api/bd-advert-banner/banner-list') diff --git a/pages.json b/pages.json index d27a21b..62d1951 100644 --- a/pages.json +++ b/pages.json @@ -108,6 +108,13 @@ "navigationBarBackgroundColor": "#fff" } }, + { + "path": "pages/bonus/menu", + "style": { + "navigationBarTitleText": "奖金查询", + "navigationBarBackgroundColor": "#fff" + } + }, { "path": "pages/bonus/index", "style": { @@ -116,6 +123,13 @@ "enablePullDownRefresh": true } }, + { + "path": "pages/bonus/real-time", + "style": { + "navigationBarTitleText": "实时奖金", + "navigationBarBackgroundColor": "#fff" + } + }, { "path": "pages/bonusSource/index", "style": { diff --git a/pages/bonus/index.vue b/pages/bonus/index.vue index c378131..f8d17d3 100644 --- a/pages/bonus/index.vue +++ b/pages/bonus/index.vue @@ -53,12 +53,14 @@ - {{ item.label }}(¥) - {{ formatAmount(item.value) }} + {{ fieldName }}(¥) + {{ + formatAmount(dailyBonus[fieldKey]) + }} @@ -116,6 +118,14 @@ export default { pageNum: 1, pageSize: 10, }, + BONUS_FIELD_MAP: { + levelGapIncome: '级差收益', + peerIncome: '平级收益', + regionalIncome: '区域收益', + welfareLevelGapIncome: '福利级差收益', + welfareDividendIncome: '福利分红收益', + repeatConsumptionIncome: '重消收益', + }, } }, onLoad() { @@ -223,17 +233,23 @@ export default { break } - const subtotal = Math.random() * 500 + const bonusDetails = { + levelGapIncome: Math.random() * 100, + peerIncome: Math.random() * 200, + regionalIncome: 0, + welfareLevelGapIncome: 0, + welfareDividendIncome: 0, + repeatConsumptionIncome: Math.random() * 50, + } + + const subtotal = Object.values(bonusDetails).reduce( + (sum, value) => sum + value, + 0 + ) + mockData.push({ date: date.format('YYYY-MM-DD'), - details: [ - { label: '级差收益', value: Math.random() * 100 }, - { label: '平级收益', value: Math.random() * 200 }, - { label: '区域收益', value: 0 }, - { label: '福利级差收益', value: 0 }, - { label: '福利分红收益', value: 0 }, - { label: '重消收益', value: Math.random() * 50 }, - ], + ...bonusDetails, subtotal: subtotal, }) } diff --git a/pages/bonus/menu.vue b/pages/bonus/menu.vue new file mode 100644 index 0000000..4553795 --- /dev/null +++ b/pages/bonus/menu.vue @@ -0,0 +1,84 @@ + + + + + diff --git a/pages/bonus/real-time.vue b/pages/bonus/real-time.vue new file mode 100644 index 0000000..db25734 --- /dev/null +++ b/pages/bonus/real-time.vue @@ -0,0 +1,204 @@ + + + + + diff --git a/pages/index/index.vue b/pages/index/index.vue index 8cf17b4..1817432 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -3,10 +3,10 @@ - - + -