ss
重庆迈尖科技有限公司
2020-06-16 b67f2c4fce992a818f287783ae7029a0b03509d3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>历史详情</title>
        <meta name="viewport" content="width=device-width,viewport-fit=cover, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
        <link rel="stylesheet" type="text/css" href="css/teamBonusMonth.css" />
        <script>
            window.onresize = function() {
                document.documentElement.style.fontSize = document.documentElement.clientWidth / 7.5 + 'px';
            };
            window.onresize();
        </script>
        <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
        <script src="http://img.flqapp.com/resource/js/app20200227.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
        <script src="js/laydate/laydate.js" type="text/javascript" charset="utf-8"></script>
    </head>
    <body id="body" v-cloak>
        <div id="root">
            <div class="div_item_bg">
                <div class="items" v-for="(item, index) in dataList">
                    <div style="height: 0.3rem;"></div>
                    <div class="itemsContent">
                        <div class="div_itemsContent_title">
 
                            <div class="itemsContent_title_left" @click="touchDate">
                                <div class="itemsContent_title">
                                    {{item.countDate}}
                                </div>
                                <img src="img/icon_down.png">
                            </div>
 
                            <div class="itemsContent_title_right">
                                <img src="img/icon_arrow.png">
                                <div @click="touchHistoryDetail(item.countDate)">历史详情</div>
                            </div>
                        </div>
 
                        <div class="div_itemsContent_content">
                            <div class="div_itemsContent_contentBG">
                                <div class="contentDesc" id="descLeft">
                                    累计团队分红
                                </div>
                                <div class="contentTitle" id="titleLeft">
                                    ¥{{item.totalMoney}}
                                </div>
                            </div>
                            <div class="div_itemsContent_contentBG">
                                <div class="contentDesc" id="descRight">
                                    总付款订单数(笔)
                                </div>
                                <div class="contentTitle" id="titlRight">
                                    {{item.totalNum}}
                                </div>
                            </div>
                            <div class="div_line"></div>
                        </div>
 
                        <div class="div_itemsContent_content">
                            <div class="div_itemsContent_contentBG">
                                <div class="contentDesc" id="descLeft">
                                    累计团队补贴
                                </div>
                                <div class="contentTitle" id="titleLeft">
                                    ¥{{item.subsidy}}
                                </div>
                            </div>
                            <div class="div_itemsContent_contentBG">
                                <div class="contentDesc" id="descRight">
                                    付款订单数(笔)
                                </div>
                                <div class="contentTitle" id="titlRight">
                                    {{item.subsidyNum}}
                                </div>
                            </div>
                            <div class="div_line"></div>
                        </div>
 
                        <div class="div_itemsContent_content">
                            <div class="div_itemsContent_contentBG">
                                <div class="contentDesc" id="descLeft">
                                    累计团队奖励
                                </div>
                                <div class="contentTitle" id="titleLeft">
                                    ¥{{item.reward}}
                                </div>
                            </div>
                            <div class="div_itemsContent_contentBG">
                                <div class="contentDesc" id="descRight">
                                    付款订单数(笔)
                                </div>
                                <div class="contentTitle" id="titlRight">
                                    {{item.rewardNum}}
                                </div>
                            </div>
                            <div class="div_line"></div>
                        </div>
 
                        <div class="div_incomeDetail" @click="touchBonusDetail(item.countDate)">
                            <div class="incomeDetail">查看团队分红详情</div>
                            <img src="img/icon_arrow.png">
                        </div>
                    </div>
                </div>
 
                <div id="input_date" style="position: fixed; left: 13%; top: 22%;"></div>
 
            </div>
 
            <div style="height: 0.5rem;"></div>
        </div>
    </body>
 
    <script type="text/javascript">
        function getQueryString(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
            var r = window.location.search.substr(1).match(reg);
            if (r != null) return unescape(r[2]);
            return null;
        };
 
        function getDaysInMonth(year, month) {
            month = parseInt(month, 10);
            var temp = new Date(year, month, 0);
            return temp.getDate();
        }
    </script>
 
    <script>
        // "http://api.flqapp.com";
        var host = "http://api.flqapp.com";
        var host1 = "http://apph5.banliapp.com";
 
        var dateRequest = getQueryString('date');
        var datetypeRequest = getQueryString('datetype');
 
        $(function() {
            var app = new Vue({
                el: '#root',
                data: {
                    buttonName: '提交预览',
                    dataList: []
                },
                watch: {
 
                },
                methods: {
                    touchDate: function() {
                        $('#input_date').css('display', 'block');
                        $('#input_date').empty();
                        laydate.render({
                            elem: '#input_date', //指定元素
                            type: 'month',
                            isInitValue: false,
                            format: 'yyyy-MM',
                            position: 'static',
                            done: function(value, date, endDate) {
                                if (value == null || value.length == 0) return;
                                $('#input_date').css('display', 'none');
                                dateRequest = value;
                                app.fetchTeamDividendStatistic(true);
                            }
                        });
                    },
 
                    touchBonusDetail: function(date) {
                        var year = date.split("年")[0];
                        var month = date.split("年")[1].split("月")[0];
                        var dateRequest = year + '-' + month;
                        yesApp.jumpWeb(host1 + '/AppInside/teamBonus/teamBonusDetail.html?datetype=2&date=' + dateRequest,
                            null)
                    },
 
                    touchHistoryDetail: function(date) {
                        var year = date.split("年")[0];
                        var month = date.split("年")[1].split("月")[0];
                        var day = getDaysInMonth(year, month);
                        var date = year + '-' + month + '-' + day;
                        yesApp.jumpWeb(host1 + '/AppInside/teamBonus/teamBonusDay.html?datetype=1&date=' + date, null)
                    },
 
                    fetchTeamDividendStatistic: function(change) {
                        yesApp.showLoading();
                        var uid = yesApp.getUid();
                        var params = {
                            uid: uid,
                            date: dateRequest,
                            datetype: datetypeRequest
                        };
                        params = yesApp.getRequestBaseParams(params);
                        $.ajax({
                            type: "GET",
                            data: JSON.parse(params),
                            url: host + "/fanli/api/v2/usermoney/getTeamDividendHistory",
                            dataType: "jsonp",
                            async: false,
                            success: function(result) {
                                yesApp.hideLoading();
                                if (result.code == 0) {
                                    if (change) { //回到顶部
                                        document.body.scrollTop = document.documentElement.scrollTop = 0;
                                    }
                                    app.dataList = result.data.list;
 
                                } else {
                                    yesApp.toast(result.msg);
                                }
                            },
                            error: function(XMLHttpRequest, textStatus, errorThrown) {
                                yesApp.hideLoading();
                                if (textStatus === 'timeout') {
                                    setTimeout(function() {}, 2000);
                                }
                            }
                        });
                    }
                }
            });
            app.fetchTeamDividendStatistic(false);
        });
    </script>
</html>