From a053811c774ac07340e46561f5d2ab4d892282a0 Mon Sep 17 00:00:00 2001 From: Administrator <1101184511@qq.com> Date: 星期一, 29 七月 2024 02:38:40 +0800 Subject: [PATCH] 渠道功能完善 --- src/main/resources/static/agent/js/index.js | 119 +++++++++++++++++++++++++++++++++++++++++------------------ 1 files changed, 82 insertions(+), 37 deletions(-) diff --git a/src/main/resources/static/agent/js/index.js b/src/main/resources/static/agent/js/index.js index a93aae8..2cea975 100644 --- a/src/main/resources/static/agent/js/index.js +++ b/src/main/resources/static/agent/js/index.js @@ -1,59 +1,104 @@ -$(function(){ - var app=new Vue({ - el:'#container', - data:{ - mode:0, - temp_screen_time_index:0, - screen_time_index:0, - orders:[1,1,1,1,1,1,1,1], - withdraw_records:[1,1,1] +$(function() { + var app = new Vue({ + el: '#container', + data: { + mode: 0, + temp_screen_time_index: 0, + current_page: 1, + screen_time_index: 0, + orders: [], + hasMore: true, + withdraw_records: [1, 1, 1, 1, 1], + order_statistic: { + user_count: 0, + order_count: 0, + total_money: 0.00 + } }, - methods:{ - change_mode:function(mode){ + mounted: function() { + + this.$nextTick(function() { + + app.search(); + }); + }, + methods: { + change_mode: function(mode) { app.mode = mode; }, - search:function(){ - - }, - open_screen:function(){ + open_screen: function() { app.temp_screen_time_index = app.screen_time_index; let index = layer.open({ - id:'screen-layer', - type:1, - title:false, - offset:'b', - content:$("#screen"), - shadeClose:true, + id: 'screen-layer', + type: 1, + title: false, + offset: 'b', + content: $("#screen"), + shadeClose: true, anim: 2, - isOutAnim:false, - area:['7.5rem','4.6rem'], + isOutAnim: false, + area: ['7.5rem', '4.6rem'], closeBtn: 0 }); layer.style(index, { - background: 'transparent' - }); + background: 'transparent' + }); }, - closeScreen:function(){ + closeScreen: function() { layer.closeAll(); }, - selectScreenTime:function(index){ + selectScreenTime: function(index) { app.temp_screen_time_index = index; }, - resetScreen:function(){ + resetScreen: function() { app.temp_screen_time_index = 0; }, - sureScreen:function(){ + sureScreen: function() { app.screen_time_index = app.temp_screen_time_index; - layer.closeAll(); + layer.closeAll(); + app.search(); }, - setAlipayAccount:function(){ - window.location.href="alipay_account_setting.html"; + setAlipayAccount: function() { + window.location.href = "alipay_account_setting.html"; + }, + search: function() { + app.current_page = 1; + app.orders = []; + app.order_statistic = { + user_count: 0, + order_count: 0, + total_money: 0.00 + }; + http_util.post("/agentapi/admin/orderList", { + key: $("#search_key").val(), + timeIndex: app.screen_time_index, + page: app.current_page + }, function(res) { + if (res.code == 0) { + 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.total_money = res.data.statistic.money; + if (app.orders.length < app.order_statistic.order_count) { + app.hasMore = true; + } else { + app.hasMore = false; + } + } + + }, function(res) { + + }); + }, + loadOrder: function() { + + }, + loadWidthdraw: function() { + } - - + } - + }); - - + }); \ No newline at end of file -- Gitblit v1.8.0