重庆迈尖科技有限公司
2020-05-20 71bccc0ff2d575bb014bd7f3f5f53503fca17024
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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>提现记录</title>
        <meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
        <link rel="stylesheet" type="text/css" href="./css/base.css" />
        <link rel="stylesheet" type="text/css" href="./css/txRecord.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>
        <script src="js/laydate/laydate.js" type="text/javascript" charset="utf-8"></script>
    </head>
    <body>
        <div id="root">
            <div class="div_item_bg">
                <div class="div_items" v-for="(item, index) in dataList">
                    <div class="div_items_top">
                        <div class="div_items_top_left">
                            <img src="img/icon_tx.png" class="imtTx">
                            <div class="div_items_top_left_content">
                                <div class="div_items_top_left_content_title">{{item.title}}</div>
                                <div class="div_items_top_left_content_content">{{item.account}}</div>
                            </div>
                        </div>
                        <div class="div_items_top_right">
                            {{item.money}}
                        </div>
                    </div>
 
                    <img src="img/icon_close.png" class="deleClose" @click="deleteData(item.id)">
                    <div class="div_items_line"></div>
                </div>
            </div>
            <!-- 添加粉丝 -->
            <div class="div_add_bg" @click="addTxRecord">
                <div class="div_img">
                    <img src="img/icon_add.png">
                </div>
                <div class="div_add_desc">添加提现记录</div>
            </div>
            <div style="height: 5.3rem"></div>
 
            <!-- 重要提示  -->
            <div class="div_tips">
                <div class="div_tips_title">重要提示</div>
                <div class="div_tips_content">
                    1.本页数据仅供数据预览使用,不可用作其他用途;<br>
                    2.本页仅对超级会员开放预览使用,且仅支持在板栗快省App中打开;<br>
                    3.系统将会记录上一次填写的预览数据;<br>
                    <span style="color: #E5005C;">4.提交预览后,系统会让相关页面保留预览数据10分钟,10分钟后恢复到非预览数据。</span>
                </div>
                <div style="height: 0.41rem;"></div>
            </div>
 
            <!-- 提交申请 -->
            <div class="div_commit">
                <div class="commitInfo" @click="commitInfo">{{buttonName}}</div>
            </div>
 
            <!--弹框 -->
            <div class="dialogmask">
                <div class="dialog">
                    <img src="img/icon_close.png" @click="hiddenDialog()">
                    <div class="dialog_title">添加提现记录</div>
 
                    <div id="tx_date" class="tx_title_desc">提现时间</div>
                    <div class="div_input_content_bg">
                        <input id="inpunt_date" class="input" type="text" placeholder="如:2020.02.02 20:00">
                    </div>
 
                    <div id="tx_other" class="tx_title_desc">提现金额</div>
                    <div class="div_input_content_bg">
                        <input id="inpunt_money" class="input" type="text" placeholder="单笔最大提现金额不超过1000" maxlength="4" oninput="value=value.replace(/[^\d]/g,'')">
                    </div>
 
                    <div class="dialog_commit" @click="commitAddTxRecord">确认</div>
                </div>
            </div>
        </div>
    </body>
 
    <script type="text/javascript">
        // laydate.render({
        //     elem: '#inpunt_date',
        //     trigger: 'click',
        //     type: 'datetime'
        // });
 
        laydate.render({
            elem: '#inpunt_ccc',
            trigger: 'touchend',
        });
    </script>
 
    <script>
        // "http://api.flqapp.com";
        var host = "http://192.168.1.253:8080";
        $(function() {
            var app = new Vue({
                el: '#root',
                data: {
                    buttonName: '提交预览',
                    dataList: [],
                },
                watch: {},
                methods: {
                    addTxRecord: function() {
                        $('.dialogmask').css('display', 'block')
                    },
                    hiddenDialog: function() {
                        $('.input').val('');
                        $('.dialogmask').css('display', 'none')
                    },
                    commitAddTxRecord: function() {
                        var txDate = $('#inpunt_date').val();
                        var txMoney = $('#inpunt_money').val();
                        if (txDate.length <= 0 || txDate == null) {
                            yesApp.toast('请输入提现时间')
                            return;
                        }
 
                        if (txMoney.length <= 0 || txMoney == null) {
                            yesApp.toast('请输入提现金额')
                            return;
                        }
 
                        if (parseInt(txMoney) > 1000) {
                            yesApp.toast('单笔最大提现金额不超过1000')
                            return;
                        }
 
                        yesApp.showLoading();
                        var uid = yesApp.getUid();
                        var params = {
                            uid: uid,
                            dayTime: txDate,
                            money: txMoney
                        };
                        params = yesApp.getRequestBaseParams(params);
 
                        $.ajax({
                            type: "GET",
                            data: JSON.parse(params),
                            url: host + "/fanli/api/v2/preview/saveExtractRecord",
                            dataType: "jsonp",
                            async: false,
                            success: function(result) {
                                if (result.code == 0) {
                                    app.hiddenDialog();
                                    app.fetchExtractRecord();
 
                                } else {
                                    yesApp.hideLoading();
                                    yesApp.toast(result.msg);
                                }
                            },
 
                            error: function(XMLHttpRequest, textStatus, errorThrown) {
                                yesApp.hideLoading();
                                if (textStatus === 'timeout') {}
                            }
                        });
                    },
 
                    fetchExtractRecord: function() {
                        var uid = yesApp.getUid();
                        var params = {
                            uid: uid,
                        };
                        params = yesApp.getRequestBaseParams(params);
 
                        $.ajax({
                            type: "GET",
                            data: JSON.parse(params),
                            url: host + "/fanli/api/v2/preview/getExtractRecord",
                            dataType: "jsonp",
                            async: false,
                            success: function(result) {
                                yesApp.hideLoading();
                                if (result.code == 0) {
                                    app.dataList = result.data.list;
 
                                } else {
                                    yesApp.toast(result.msg);
                                }
                            },
                            error: function(XMLHttpRequest, textStatus, errorThrown) {
                                yesApp.hideLoading();
                                if (textStatus === 'timeout') {
                                    setTimeout(function() {}, 2000);
                                }
                            }
                        });
                    },
 
                    commitInfo: function() {
                        yesApp.showLoading();
                        var uid = yesApp.getUid();
                        var params = {
                            uid: uid,
                        };
                        params = yesApp.getRequestBaseParams(params);
 
                        $.ajax({
                            type: "GET",
                            data: JSON.parse(params),
                            url: host + "/fanli/api/v2/preview/previewExtractRecord",
                            dataType: "jsonp",
                            async: false,
                            success: function(result) {
                                if (result.code == 0) {
                                    yesApp.hideLoading();
                                    yesApp.toast('' + result.data);
 
                                } else {
                                    yesApp.hideLoading();
                                    yesApp.toast(result.msg);
                                }
                            },
                            error: function(XMLHttpRequest, textStatus, errorThrown) {
                                yesApp.hideLoading();
                                if (textStatus === 'timeout') {
                                    alert('請求超時');
                                    setTimeout(function() {
                                        alert('重新请求');
                                    }, 2000);
                                }
                            }
                        });
                    },
 
                    deleteData: function(idType) {
                        yesApp.showLoading();
                        var uid = yesApp.getUid();
                        var params = {
                            uid: uid,
                            id: idType,
                        };
                        params = yesApp.getRequestBaseParams(params);
 
                        $.ajax({
                            type: "GET",
                            data: JSON.parse(params),
                            url: host + "/fanli/api/v2/preview/deleteExtractRecord",
                            dataType: "jsonp",
                            async: false,
                            success: function(result) {
                                if (result.code == 0) {
                                    app.hiddenDialog();
                                    app.fetchExtractRecord();
 
                                } else {
                                    yesApp.hideLoading();
                                    yesApp.toast(result.msg);
                                }
                            },
                            error: function(XMLHttpRequest, textStatus, errorThrown) {
                                yesApp.hideLoading();
                                if (textStatus === 'timeout') {
                                    alert('請求超時');
                                    setTimeout(function() {
                                        alert('重新请求');
                                    }, 2000);
                                }
                            }
                        });
                    }
                }
            });
            app.fetchExtractRecord();
        });
    </script>
</html>