diff --git a/api/product.js b/api/product.js index fe2cfaa..0f3e70b 100644 --- a/api/product.js +++ b/api/product.js @@ -136,4 +136,12 @@ export function getGoodsTags(params) { }); } +// 搜索商品(分页) +export function getSearchGoodsList(params) { + return request({ + url: "/goods/searchPageList", + method: "get", + data: params, + }); +} diff --git a/pages/mine_package/mine_order/mine_order.vue b/pages/mine_package/mine_order/mine_order.vue index e323213..8acae2e 100644 --- a/pages/mine_package/mine_order/mine_order.vue +++ b/pages/mine_package/mine_order/mine_order.vue @@ -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, }); }, // 处理到期时间 diff --git a/pages/mine_package/mine_order_info/mine_order_info.vue b/pages/mine_package/mine_order_info/mine_order_info.vue index b09d124..212b204 100644 --- a/pages/mine_package/mine_order_info/mine_order_info.vue +++ b/pages/mine_package/mine_order_info/mine_order_info.vue @@ -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) { diff --git a/pages/rwa_package/shop/points-shop.vue b/pages/rwa_package/shop/points-shop.vue index 4ec8480..6ab9a4d 100644 --- a/pages/rwa_package/shop/points-shop.vue +++ b/pages/rwa_package/shop/points-shop.vue @@ -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(); }); diff --git a/utils/config.js b/utils/config.js index f6c7b2b..406e545 100644 --- a/utils/config.js +++ b/utils/config.js @@ -6,16 +6,14 @@ if (process.env.NODE_ENV === 'development') { } // #endif -export const BASE_URL = "https://api.tbmall.xin"; //生产 -export const MILD_BASE_URL = "https://agent.tbmall.xin/"; //中台生产 -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 = "https://api.tbmall.xin"; //生产 +// export const MILD_BASE_URL = "https://agent.tbmall.xin/"; //中台生产 +// 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"; // https://h.o.tbmall.xin/#/