diff --git a/pages/goods/details/index.wxml b/pages/goods/details/index.wxml index 893d262..5c09b34 100644 --- a/pages/goods/details/index.wxml +++ b/pages/goods/details/index.wxml @@ -135,7 +135,7 @@ specList="{{details.specList || []}}" skuList="{{skuArray}}" limitBuyInfo="{{details.limitInfo[0].text || ''}}" - limitMaxCount="{{ selectSkuQuantity }}" + limitMaxCount="{{ selectSkuQuantity || details.spuStockQuantity }}" quantity="{{ details.spuStockQuantity }}" bind:closeSpecsPopup="handlePopupHide" bind:change="chooseSpecItem" diff --git a/pages/goods/list/index.js b/pages/goods/list/index.js index 24959ce..7058d37 100644 --- a/pages/goods/list/index.js +++ b/pages/goods/list/index.js @@ -40,11 +40,11 @@ Page({ }, generalQueryData(reset = false) { - const { filter, keywords, minVal, maxVal , goodsCategoryGuid} = this.data; + const { filter, keywords, minVal, maxVal , goodsCategoryGuid,sorts, overall} = this.data; const { pageNum, pageSize } = this; - const { sorts, overall } = filter; + // const { sorts, overall } = filter; const params = { - // sort: 0, // 0 综合,1 价格 + goodsSort: 0, // 0 综合,1 价格 pageNum: 1, pageSize: 6, goodsCategoryGuid: goodsCategoryGuid @@ -52,15 +52,15 @@ Page({ }; if (sorts) { - params.sort = 1; - params.sortType = sorts === 'desc' ? 1 : 0; + params.goodsSort = 1; + params.goodsSortType = sorts === 'desc' ? 1 : 0; } - // if (overall) { - // params.sort = 0; - // } else { - // params.sort = 1; - // } + if (overall) { + params.goodsSort = 0; + } else { + params.goodsSort = 1; + } // params.minPrice = minVal ? minVal * 100 : 0; // params.maxPrice = maxVal ? maxVal * 100 : undefined; if (reset) return params; diff --git a/services/_utils/request.js b/services/_utils/request.js index 666dc06..46b3592 100644 --- a/services/_utils/request.js +++ b/services/_utils/request.js @@ -4,6 +4,7 @@ import { } from '~/utils/storage' export const ServerBasePath = 'http://localhost:8888/api/'; +// export const ServerBasePath = 'http://192.168.1.102:8888/api/'; // 网络请求封装 export function request(option) { diff --git a/services/good/fetchGoodsList.js b/services/good/fetchGoodsList.js index 5867724..ded6362 100644 --- a/services/good/fetchGoodsList.js +++ b/services/good/fetchGoodsList.js @@ -18,7 +18,6 @@ export function fetchGoodsList(params) { if (item.images) { item.thumb = item.images.split(',')[0]; } - console.log(item.thumb); // 标签 // if (item.spuTagList) {