Browse Source

feat 优化

Funny 3 years atrás
parent
commit
73d5a78436

+ 4 - 0
src/api/amount.js

@@ -34,4 +34,8 @@ export const getCouponExplain = ( params ) => {
 // 消费明细列表
 export const getAccountFlow = ( params ) => {
   return get( 'app/member/accountFlow', params )
+}
+
+export const balanceLogs = ( params ) => {
+  return get('app/member/balance/logs', params)
 }

+ 0 - 8
src/api/user.js

@@ -15,11 +15,3 @@ export const loginVerification = ( params ) => {
 export const forgotPassword = ( params ) => {
   return post( 'app/login/password/change', params )
 }
-
-export const couponList = ( params ) => {
-  return get('app/coupon/list', params)
-}
-
-export const balanceLogs = ( params ) => {
-  return get('app/member/balance/logs', params)
-}

+ 8 - 6
src/components/Home.vue

@@ -120,12 +120,11 @@ export default {
     this.getMarker();
     this.timer = setInterval(() => {
       this.getMarker();
-      if(this.tabNum < 2){
+      if (this.tabNum < 2) {
         this.getRefreshOrder();
-      }else{
+      } else {
         // this.getOrder()
       }
-      
     }, 5000);
   },
   mounted() {},
@@ -139,9 +138,12 @@ export default {
   },
   methods: {
     search() {
-      this.params.pageNum = 1;
-      this.orderList = [];
-      this.getOrder();
+      this.$route.push({
+        path: ''
+      })
+      // this.params.pageNum = 1;
+      // this.orderList = [];
+      // this.getOrder();
     },
     handleSizeChange(val) {
       this.params.pageNum = 1;

+ 1 - 1
src/components/accountCompoents/recharge.vue

@@ -25,7 +25,7 @@
 </template>
 
 <script>
-  import { balanceLogs } from '../../api/user.js';
+  import { balanceLogs } from '../../api/amount.js';
   export default {
     data() {
       return {

+ 2 - 2
src/components/orderComponents/sendOrderPopup.vue

@@ -100,7 +100,7 @@
 import bus from "../../common/bus.js";
 import qrCode from "../../common/qrCode.vue";
 import { mapState } from "vuex";
-import { couponList } from "../../api/user.js";
+import { getCouponList } from "../../api/amount.js";
 import { sendOrder } from "../../api/order.js";
 export default {
   data() {
@@ -536,7 +536,7 @@ export default {
         status: 0,
         isNew: 1,
       };
-      couponList(params).then((res) => {
+      getCouponList(params).then((res) => {
         if (res.code == 200) {
           console.log(res.data);
           this.couponList = this.couponList.concat(res.data.data);