admin
2020-06-11 3bc16a1d3afee0d1ba5c39b1415309e1fe2c63a1
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
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>快省云发单</title>
        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
        <link rel="stylesheet" type="text/css" href="css/base.css" />
        <link rel="stylesheet" type="text/css" href="css/openRecord.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/app2019112217.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
        <link href="css/load.css" rel="stylesheet" />
        <style type="text/css">
            [v-cloak] {
                display: none !important;
            }
        </style>
    </head>
    <body>
        <div id="root" style="display: none;">
            <div class="div_header">
                <div class="div_header_title">
                    <div class="div_header_1" @click="selectTab(1)">
                        <p>云发单管理</p>
                    </div>
                    <div class="div_header_mid">
                        <div></div>
                    </div>
                    <div class="div_header_2" @click="selectTab(2)">
                        <p>发单商品库</p>
                    </div>
                </div>
 
                <div class="div_header_line">
                    <div class="div_header_line_1"></div>
                    <div class="div_header_line_2"></div>
                </div>
            </div>
            <div class="div_openRecord">开通记录</div>
 
            <!-- 云发单管理 -->
            <div class="div_cloudPushOrderManage_other">
                <div class="div_list">
                    <div class="div_item" v-for="(item, index) in dataList">
                        <div class="div_item_left">
                            <img src="img/icon_record.png" style="width: 0.7rem;height: 0.7rem;margin-left: 0.16rem;margin-top: 0.39rem;">
                            <div>
                                <div style="color: #333333;font-size: 0.28rem;height: 0.28rem;display: -webkit-flex;align-items: center;margin-top: 0.3rem;margin-left: 0.24rem;">
                                    {{item.desc}}
                                </div>
                                <div style="color: #E5005C;font-size: 0.36rem;height: 0.28rem;font-weight: bold; display: -webkit-flex;align-items: center;margin-top: 0.28rem;margin-left: 0.22rem;">
                                    ¥{{item.money}}
                                </div>
                            </div>
                        </div>
                        <div style="color: #666666;font-size: 0.24rem;height: 0.18rem;display: -webkit-flex;align-items: center;margin-top: 0.35rem;margin-right: 0.2rem;">
                            {{item.createTime}}
                        </div>
 
                        <div class="line"></div>
                    </div>
                </div>
            </div>
 
            <div class="loading-more"></div>
        </div>
    </body>
 
    <script src="js/load.js"></script>
 
    <script>
        // "http://api.flqapp.com";
        var host = "http://api.flqapp.com";
        var host1 = "http://192.168.1.114:8848";
        var page = 1;
 
        $(function() {
            var app = new Vue({
                el: '#root',
                data: {
                    selectTabType: 1,
                    dataList: [{}, {}],
                    count: 0
                },
                watch: {
                    dataList: function(val) {
                        $('#root').css('display', 'block');
                    }
                },
                methods: {
                    selectTab: function(type) {
                        if (app.selectTabType == type) return;
                        $('.div_header_line_' + type).css('opacity', '1')
                        $('.div_header_' + type).css('color', '#E5005C')
 
                        $('.div_header_line_' + app.selectTabType).css('opacity', '0')
                        $('.div_header_' + app.selectTabType).css('color', '#000000')
 
                        app.selectTabType = type
                    },
 
                    fetchOrderRecord: function() {
                        yesApp.showLoading();
                        var uid = yesApp.getUid();
                        var params = {
                            uid: uid,
                            page: page,
                        };
                        params = yesApp.getRequestBaseParams(params);
                        $.ajax({
                            type: "GET",
                            data: JSON.parse(params),
                            url: host + "/fanli/api/v2/user/cloud/getOrderRecord",
                            dataType: "jsonp",
                            async: false,
                            success: function(result) {
                                load.hidden();
                                yesApp.hideLoading();
                                if (result.code == 0) {
                                    if (page == 1) {
                                        app.dataList = new Array();
                                    }
                                    page += 1;
                                    app.count = result.data.count;
 
                                    var list = app.dataList.concat(result.data.list);
                                    app.dataList = list;
 
                                    if (app.count <= app.dataList.length) {
                                        load.noMore();
                                    }
                                    
                                } else {
                                    yesApp.toast(result.msg);
                                }
                            },
                            error: function(XMLHttpRequest, textStatus, errorThrown) {
                                load.hidden();
                                yesApp.hideLoading();
                                if (textStatus === 'timeout') {
                                    setTimeout(function() {}, 2000);
                                }
                            }
                        });
                    },
                }
            });
            app.fetchOrderRecord();
        });
 
        //(浏览器窗口上边界内容高度)
        function getDocumentTop() {
            var scrollTop = 0,
                bodyScrollTop = 0,
                documentScrollTop = 0;
            if (document.body) {
                bodyScrollTop = document.body.scrollTop;
            }
            if (document.documentElement) {
                documentScrollTop = document.documentElement.scrollTop;
            }
            scrollTop = (bodyScrollTop - documentScrollTop > 0) ? bodyScrollTop : documentScrollTop;
            console.log("scrollTop:" + scrollTop);
            return scrollTop;
        }
 
        //可视窗口高度(屏幕可以看见的高度)
        function getWindowHeight() {
            var windowHeight = 0;
            if (document.compatMode == "CSS1Compat") {
                windowHeight = document.documentElement.clientHeight;
            } else {
                windowHeight = document.body.clientHeight;
            }
            console.log("windowHeight:" + windowHeight);
            return windowHeight;
        }
 
        //滚动条滚动高度(即整个网页的高度)
        function getScrollHeight() {
            var scrollHeight = 0,
                bodyScrollHeight = 0,
                documentScrollHeight = 0;
            if (document.body) {
                bodyScrollHeight = document.body.scrollHeight;
            }
            if (document.documentElement) {
                documentScrollHeight = document.documentElement.scrollHeight;
            }
            scrollHeight = (bodyScrollHeight - documentScrollHeight > 0) ? bodyScrollHeight : documentScrollHeight;
            console.log("scrollHeight:" + scrollHeight);
            return scrollHeight;
        }
    </script>
</html>