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
+8
View File
@@ -136,4 +136,12 @@ export function getGoodsTags(params) {
}); });
} }
// 搜索商品(分页)
export function getSearchGoodsList(params) {
return request({
url: "/goods/searchPageList",
method: "get",
data: params,
});
}
+1 -1
View File
@@ -734,7 +734,7 @@ export default {
jumpOrderInfo(item) { jumpOrderInfo(item) {
uni.navigateTo({ uni.navigateTo({
url: 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", height: "100vh",
isShowBalance: false, isShowBalance: false,
qrcodeVal: '', qrcodeVal: '',
returnType: 1
}; };
}, },
onLoad(options) { onLoad(options) {
const id = options.id; const id = options.id;
this.id = id ? parseInt(id, 10) : 0; this.id = id ? parseInt(id, 10) : 0;
this.returnType = options.type || 1;
this.getOrderInfo(); this.getOrderInfo();
const payOpen = options.payOpen; const payOpen = options.payOpen;
// 支付弹框 // 支付弹框
@@ -302,10 +304,10 @@ export default {
formatDate, formatDate,
formatDate1, formatDate1,
jumpLeft() { jumpLeft() {
const type = this.orderInfo.status + 1; // const type = this.orderInfo.status + 1;
uni.navigateTo({ uni.navigateTo({
url: url:
"/pages/mine_package/mine_order/mine_order?type=" + type "/pages/mine_package/mine_order/mine_order?type=" + this.returnType
}); });
}, },
wayShowFun(type) { wayShowFun(type) {
+8 -12
View File
@@ -47,7 +47,7 @@
import Header from '@/components/common/header.vue'; import Header from '@/components/common/header.vue';
import TopSafe from '@/components/common/top-safe.nvue'; import TopSafe from '@/components/common/top-safe.nvue';
import MyBtn from '@/components/common/my-btn.vue'; 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 { getAcctBalance } from "@/api/finance.js";
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js"; import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
@@ -146,21 +146,17 @@ export default {
minDeduction: currentSwiperItem.minDeduction || 0, minDeduction: currentSwiperItem.minDeduction || 0,
maxDeduction: currentSwiperItem.maxDeduction || 999999, maxDeduction: currentSwiperItem.maxDeduction || 999999,
}; };
searchList(params).then((res) => { getSearchGoodsList(params).then((res) => {
let curPageLen = res.data ? res.data.length : 0; let resData = res.data || {};
let totalCount = (res.data && res.data.total !== undefined) let curList = resData.entitys || [];
? res.data.total let curPageLen = curList.length;
: ((res.data && res.data.totalCount !== undefined) let totalCount = resData.totalCount !== undefined ? resData.totalCount : 0;
? res.data.totalCount
: (res.total !== undefined ? res.total : (res.totalCount !== undefined ? res.totalCount : 0)));
if (page.num === 1) this.dataList = []; if (page.num === 1) this.dataList = [];
if (res.data) { this.dataList = this.dataList.concat(curList);
this.dataList = this.dataList.concat(res.data);
}
this.waterfall(); this.waterfall();
this.mescroll.endBySize(curPageLen, totalCount); this.mescroll && this.mescroll.endBySize(curPageLen, totalCount);
}).catch(() => { }).catch(() => {
this.mescroll && this.mescroll.endErr(); this.mescroll && this.mescroll.endErr();
}); });
+6 -8
View File
@@ -6,16 +6,14 @@ if (process.env.NODE_ENV === 'development') {
} }
// #endif // #endif
export const BASE_URL = "https://api.tbmall.xin"; //生产 // export const BASE_URL = "https://api.tbmall.xin"; //生产
export const MILD_BASE_URL = "https://agent.tbmall.xin/"; //中台生产 // export const MILD_BASE_URL = "https://agent.tbmall.xin/"; //中台生产
export const kefuBaseUrl = "https://admin.tbmall.xin/api"; // export const kefuBaseUrl = "https://admin.tbmall.xin/api";
// export const BASE_URL = baseUrl; // 本地测试
// export const MILD_BASE_URL = "https://agent.o.tbmall.xin/"; //中台测试
// export const kefuBaseUrl = "https://admin.o.tbmall.xin/api";
export const BASE_URL = baseUrl; // 本地测试
export const MILD_BASE_URL = "https://agent.o.tbmall.xin/"; //中台测试
export const kefuBaseUrl = "https://admin.o.tbmall.xin/api";
// https://h.o.tbmall.xin/#/ // https://h.o.tbmall.xin/#/