feat:货品接口带分页

This commit is contained in:
2026-09-02 18:47:30 +08:00
parent 469451232a
commit b1d3ec9b2f
5 changed files with 27 additions and 23 deletions
+1 -1
View File
@@ -734,7 +734,7 @@ export default {
jumpOrderInfo(item) {
uni.navigateTo({
url:
"/pages/mine_package/mine_order_info/mine_order_info?id=" + item.id,
"/pages/mine_package/mine_order_info/mine_order_info?id=" + item.id + '&type=' + this.form.type,
});
},
// 处理到期时间
@@ -282,11 +282,13 @@ export default {
height: "100vh",
isShowBalance: false,
qrcodeVal: '',
returnType: 1
};
},
onLoad(options) {
const id = options.id;
this.id = id ? parseInt(id, 10) : 0;
this.returnType = options.type || 1;
this.getOrderInfo();
const payOpen = options.payOpen;
// 支付弹框
@@ -302,10 +304,10 @@ export default {
formatDate,
formatDate1,
jumpLeft() {
const type = this.orderInfo.status + 1;
// const type = this.orderInfo.status + 1;
uni.navigateTo({
url:
"/pages/mine_package/mine_order/mine_order?type=" + type
"/pages/mine_package/mine_order/mine_order?type=" + this.returnType
});
},
wayShowFun(type) {
+8 -12
View File
@@ -47,7 +47,7 @@
import Header from '@/components/common/header.vue';
import TopSafe from '@/components/common/top-safe.nvue';
import MyBtn from '@/components/common/my-btn.vue';
import { searchList } from '@/api/product.js';
import { searchList, getSearchGoodsList } from '@/api/product.js';
import { getAcctBalance } from "@/api/finance.js";
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
@@ -146,21 +146,17 @@ export default {
minDeduction: currentSwiperItem.minDeduction || 0,
maxDeduction: currentSwiperItem.maxDeduction || 999999,
};
searchList(params).then((res) => {
let curPageLen = res.data ? res.data.length : 0;
let totalCount = (res.data && res.data.total !== undefined)
? res.data.total
: ((res.data && res.data.totalCount !== undefined)
? res.data.totalCount
: (res.total !== undefined ? res.total : (res.totalCount !== undefined ? res.totalCount : 0)));
getSearchGoodsList(params).then((res) => {
let resData = res.data || {};
let curList = resData.entitys || [];
let curPageLen = curList.length;
let totalCount = resData.totalCount !== undefined ? resData.totalCount : 0;
if (page.num === 1) this.dataList = [];
if (res.data) {
this.dataList = this.dataList.concat(res.data);
}
this.dataList = this.dataList.concat(curList);
this.waterfall();
this.mescroll.endBySize(curPageLen, totalCount);
this.mescroll && this.mescroll.endBySize(curPageLen, totalCount);
}).catch(() => {
this.mescroll && this.mescroll.endErr();
});