From 737ed7b58282e2db6b91eb3cd80a8fdf3bb4179d Mon Sep 17 00:00:00 2001 From: dengtongyu Date: Sun, 5 Sep 2021 20:27:24 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.js | 8 ++- src/components/dataList/dataListItem.vue | 70 ++++++++++++++++++++++++ src/components/dataList/index.js | 7 +++ src/components/dataList/main.vue | 69 +++++++++++++++++++++++ src/main.js | 4 +- src/styles/cover.less | 3 +- src/views/Home.vue | 24 +++++++- src/views/dataView.vue | 60 ++++++++++++++++++++ src/views/recordView.vue | 13 +++-- 9 files changed, 249 insertions(+), 9 deletions(-) create mode 100644 src/components/dataList/dataListItem.vue create mode 100644 src/components/dataList/index.js create mode 100644 src/components/dataList/main.vue create mode 100644 src/views/dataView.vue diff --git a/src/api/index.js b/src/api/index.js index c146cb0..45877bb 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -45,6 +45,11 @@ const drawRecord = param => { return ajax.get(`${HOST}/drawRecord`, param); }; +// 数据查询 +const rateList = param => { + return ajax.post(`${HOST}/rateList`, stringify(param), "form"); +}; + export { queryPrizeInfo, queryTicketNum, @@ -53,5 +58,6 @@ export { saveLog, queryPrizeMsg, getRuleTip, - drawRecord + drawRecord, + rateList }; diff --git a/src/components/dataList/dataListItem.vue b/src/components/dataList/dataListItem.vue new file mode 100644 index 0000000..512881b --- /dev/null +++ b/src/components/dataList/dataListItem.vue @@ -0,0 +1,70 @@ + + + + + diff --git a/src/components/dataList/index.js b/src/components/dataList/index.js new file mode 100644 index 0000000..710d4ba --- /dev/null +++ b/src/components/dataList/index.js @@ -0,0 +1,7 @@ +import DataList from "./main"; + +DataList.install = function(Vue) { + Vue.component(DataList.name, DataList); +}; + +export default DataList; diff --git a/src/components/dataList/main.vue b/src/components/dataList/main.vue new file mode 100644 index 0000000..f2ae2a8 --- /dev/null +++ b/src/components/dataList/main.vue @@ -0,0 +1,69 @@ + + + + + diff --git a/src/main.js b/src/main.js index 79e5607..445f7ff 100644 --- a/src/main.js +++ b/src/main.js @@ -10,7 +10,8 @@ import { Popup, Image as VanImage, List, - Empty + Empty, + Icon } from "vant"; Vue.config.productionTip = false; @@ -23,6 +24,7 @@ Vue.use(Popup); Vue.use(VanImage); Vue.use(List); Vue.use(Empty); +Vue.use(Icon); new Vue({ router, diff --git a/src/styles/cover.less b/src/styles/cover.less index 1ef7a76..35cc1cf 100644 --- a/src/styles/cover.less +++ b/src/styles/cover.less @@ -3,5 +3,6 @@ @tabs-nav-background-color: none; @tabs-bottom-bar-color: #DBCFFF; +@empty-description-color: #AFAAFF; -@empty-description-color: #AFAAFF; \ No newline at end of file +@list-text-color: #AFAAFF; \ No newline at end of file diff --git a/src/views/Home.vue b/src/views/Home.vue index 515d368..74099c7 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -21,6 +21,10 @@ +
+ +
+ require(["./prizesView.vue"], resolve), ruleView: resolve => require(["./ruleView.vue"], resolve), recordView: resolve => require(["./recordView.vue"], resolve), - rankView: resolve => require(["./rankView.vue"], resolve) + rankView: resolve => require(["./rankView.vue"], resolve), + dataView: resolve => require(["./dataView.vue"], resolve) }, data() { return { @@ -66,7 +71,8 @@ export default { 规则: "rule-view", 奖品: "prizes-view", 排行: "rank-view", - 记录: "record-view" + 记录: "record-view", + 数据: "data-view" } }; }, @@ -95,6 +101,10 @@ export default { // console.log("clickEntryBtn", val); this.curBtnText = val; this.show = true; + }, + clickLeftTopButton() { + this.curBtnText = "数据"; + this.show = true; } } }; @@ -105,6 +115,7 @@ export default { padding: 20px 25px; height: 100%; box-sizing: border-box; + position: relative; } .top-btn-and-box { position: relative; @@ -119,4 +130,13 @@ export default { padding-top: 64px; } } +.left-top-button { + width: 60px; + height: 60px; + position: absolute; + left: 20px; + top: 20px; + color: #fff; + font-size: 60px; +} diff --git a/src/views/dataView.vue b/src/views/dataView.vue new file mode 100644 index 0000000..4293e40 --- /dev/null +++ b/src/views/dataView.vue @@ -0,0 +1,60 @@ + + + + + diff --git a/src/views/recordView.vue b/src/views/recordView.vue index 5194bd9..39b4625 100644 --- a/src/views/recordView.vue +++ b/src/views/recordView.vue @@ -3,6 +3,7 @@

抽奖记录

今日投入产出比:{{ rate }}

+

今日投入{{ userTotalPay }},今日产出{{ totalPlatformValue }}

@@ -38,10 +39,14 @@ export default { ...mapGetters(["lotteryRecordRateVo"]), rate() { return this.lotteryRecordRateVo.rate; + }, + userTotalPay() { + return this.lotteryRecordRateVo.userTotalPay; + }, + totalPlatformValue() { + return this.lotteryRecordRateVo.totalPlatformValue; } - }, - created() {}, - methods: {} + } }; @@ -70,7 +75,7 @@ export default { } &-content { &-pane { - height: calc(100vh - 20px - 72px - 50px - 11.734vw); + height: calc(100vh - 20px - 72px - 50px - 50px - 11.734vw); overflow-y: auto; } }