dujingxian 4 rokov pred
rodič
commit
ec92a95cdf

+ 4 - 4
src/api/index.js

@@ -147,7 +147,7 @@ export const addIp = (ip) => {
 
 // 获取订单统计列表
 export const getOrderList = (page) => {
-    return requestLoading(`${Prefix}act=merchant_order&op=list&client_type=ajax&page=${page}`, 'post')
+    return requestLoading(`${Prefix}act=merchant_order&op=list&client_type=ajax&curpage=${page}`, 'post')
 }
 
 /**
@@ -158,7 +158,7 @@ export const getOrderList = (page) => {
  * @param {*} card_type 充值类型
  */
 export const queryList = (page,start_time, end_time, card_type) => {
-    return requestLoading(`${Prefix}act=merchant_order&op=list&client_type=ajax&page=${page}&start_time=${start_time}&end_time=${end_time}&card_type=${card_type}`, 'post')
+    return requestLoading(`${Prefix}act=merchant_order&op=list&client_type=ajax&curpage=${page}&start_time=${start_time}&end_time=${end_time}&card_type=${card_type}`, 'post')
 }
 
 // 修改管理员密码
@@ -173,7 +173,7 @@ export const getUserInfo = () => {
 
 // 实时动账
 export const getMovingAccount = (page) => {
-    return requestLoading(`${Prefix}act=merchant_info&op=pdlog&client_type=ajax&page=${page}`, 'post')
+    return requestLoading(`${Prefix}act=merchant_info&op=pdlog&client_type=ajax&curpage=${page}`, 'post')
 }
 
 /**
@@ -184,7 +184,7 @@ export const getMovingAccount = (page) => {
  * @param {*} lg_order_sn 业务单号
  */
 export const queryMovingAccount = (page, start_time, end_time, lg_type, lg_order_sn) => {
-    return requestLoading(`${Prefix}act=merchant_info&op=pdlog&client_type=ajax&page=${page}&start_time=${start_time}&end_time=${end_time}&lg_type=${lg_type}&lg_order_sn=${lg_order_sn}`, 'post')
+    return requestLoading(`${Prefix}act=merchant_info&op=pdlog&client_type=ajax&curpage=${page}&start_time=${start_time}&end_time=${end_time}&lg_type=${lg_type}&lg_order_sn=${lg_order_sn}`, 'post')
 }
 // 余额列表
 // export const balanceList = (params) => {

+ 5 - 3
src/pages/index.vue

@@ -205,10 +205,12 @@ export default {
     // 监听器
     watch: {
         '$route': {
-            handler(newVal) {
-                // console.log(newVal.path, oldVal.path);
-                if (newVal.path === '/') {
+            handler(newVal, oldVal) {
+                console.log(newVal.path, oldVal.path);
+                if (newVal && newVal.path == '/') {
                     this.curPath = ''
+                } else {
+                    this.curPath = this.$route.name
                 }
             }
         }

+ 3 - 3
src/pages/subPages/message.vue

@@ -98,10 +98,10 @@ export default {
     methods: {
         // 获取实时动账
         async getMovingAccount() {
-            const res = await getMovingAccount()
+            const res = await getMovingAccount(1)
             console.log('动账', res);
             this.tableData = res.datas.data
-            this.total = res.datas.total
+            this.total = res.datas.total * this.pageSize
         },
         // 页码
         async onPageChange(page) {
@@ -123,7 +123,7 @@ export default {
             const res = await queryMovingAccount(this.pageNumber,this.startTime, this.endTime, this.changeVal, this.orderNum)
             console.log('查询动账', res);
             this.tableData = res.datas.data
-            this.total = res.datas.total
+            this.total = res.datas.total * this.pageSize
         },
         // 重置
         onReset() {

+ 13 - 8
src/pages/subPages/order.vue

@@ -118,7 +118,7 @@ export default {
             const res = await getOrderList(1)
             console.log('订单列表', res);
             this.tableData = res.datas.data
-            this.total = res.datas.total
+            this.total = res.datas.total * this.pageSize
             // const res = await getIp()
             // console.log('res', res);
         },
@@ -139,10 +139,10 @@ export default {
         async queryList() {
             const startTime = this.dataRange[0]
             const endTime = this.dataRange[1]
-            const res = await queryList(startTime, endTime, this.RechargeType)
+            const res = await queryList(this.pageNumber, startTime, endTime, this.RechargeType)
             console.log('查询订单', res);
             this.tableData = res.datas.data
-            this.total = res.datas.total
+            this.total = res.datas.total * this.pageSize
         },
         // 重置
         onReset() {
@@ -152,15 +152,20 @@ export default {
             this.getOrderList();
         },
         // 分页
-        onPageChange(page) {
+        async onPageChange(page) {
             if (page == this.pageNumber) {
                 return;
             } else {
                 this.pageNumber = page;
-                setTimeout(() => {
-                    // this.getActionLogList();
-                    this.getOrderList(this.pageNumber)
-                }, 0);
+                // setTimeout(() => {
+                //     // this.getActionLogList();
+                //     this.getOrderList(this.pageNumber)
+                // }, 0);
+                const startTime = this.dataRange[0]
+                const endTime = this.dataRange[1]
+                const res = await queryList(this.pageNumber, startTime, endTime, this.RechargeType)
+                console.log('查询订单', res);
+                this.tableData = res.datas.data
             }
         },
     },