From bc56870059cca013649077af0e53891cba8dbfd1 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期日, 04 八月 2024 09:43:41 +0800 Subject: [PATCH] 代理新功能完善 --- src/main/resources/static/agent/js/index.js | 44 +++++++++++++++++++++++--------------------- 1 files changed, 23 insertions(+), 21 deletions(-) diff --git a/src/main/resources/static/agent/js/index.js b/src/main/resources/static/agent/js/index.js index 3e3a5ef..ffc13d5 100644 --- a/src/main/resources/static/agent/js/index.js +++ b/src/main/resources/static/agent/js/index.js @@ -12,9 +12,10 @@ order_statistic: { user_count: 0, order_count: 0, + valid_order_count:0, total_money: 0.00 }, - config:{} + config: {} }, mounted: function() { @@ -24,12 +25,12 @@ }); }, methods: { - to_miandan:function(){ - window.location.href=app.config.submitKeyUrl; + to_miandan: function() { + window.location.href = app.config.submitKeyUrl; }, change_mode: function(mode) { app.mode = mode; - if(mode==1){ + if (mode == 1) { app.withdrawList(); } }, @@ -68,16 +69,15 @@ setAlipayAccount: function() { window.location.href = "alipay_account_setting.html"; }, - - getConfig:function(){ - http_util.post("/agentapi/admin/getConfig", { - }, function(res) { + + getConfig: function() { + http_util.post("/agentapi/admin/getConfig", {}, function(res) { if (res.code == 0) { app.config = res.data; } - + }, function(res) { - + }); }, requestOrders: function() { @@ -92,7 +92,8 @@ } app.orders = app.orders.concat(res.data.list); app.order_statistic.order_count = res.data.count; - app.order_statistic.user_count = res.data.statistic.count; + app.order_statistic.valid_order_count = res.data.statistic.count; + app.order_statistic.user_count = res.data.statistic.userCount; app.order_statistic.total_money = res.data.statistic.money; if (app.orders.length < app.order_statistic.order_count) { app.hasMore = true; @@ -114,14 +115,14 @@ app.withdraw_records = []; } app.withdraw_records = app.withdraw_records.concat(res.data.list); - if (app.withdraw_records.length <res.data.count) { + if (app.withdraw_records.length < res.data.count) { app.hasMore = true; } else { app.hasMore = false; } } }, function(res) { - + }); }, search: function() { @@ -129,42 +130,43 @@ app.order_statistic = { user_count: 0, order_count: 0, + valid_order_count: 0, total_money: 0.00 }; app.requestOrders(); }, - withdrawList:function(){ + withdrawList: function() { app.current_page = 1; app.requestWithdraw(); }, - + loadOrder: function() { - if(!app.hasMore){ + if (!app.hasMore) { return; } app.current_page += 1; app.requestOrders(); }, loadWidthdraw: function() { - if(!app.hasMore){ + if (!app.hasMore) { return; } app.current_page += 1; app.requestWithdraw(); }, - withdraw:function(id){ + withdraw: function(id) { http_util.post("/agentapi/admin/withdraw", { id: id }, function(res) { if (res.code == 0) { app.withdrawList(); - }else{ + } else { layer.msg(res.msg); } }, function(res) { - + }); - + } } -- Gitblit v1.8.0