Commit 860a385d by 谢中龙

商品接口对接

parent 0913f62c
......@@ -34,11 +34,11 @@ wxService.page({
},
goods : {
goodsTypeArr: [
{ name: '最新', type: 2, active: true },
{ name: '最热🔥', type: 3, active: false },
{ name: '推荐👍', type: 1, active: false }
{ name: '最新', type: 'new', active: true },
{ name: '最热🔥', type: 'hot', active: false },
{ name: '推荐👍', type: 'recommend', active: false }
],
currentGoodsType: 2,
currentGoodsType: 'new',
goodsList: []
},
shareModel : {
......@@ -320,7 +320,8 @@ wxService.page({
wx.showLoading({
title: '加载中..',
});
wxService.post(`/merchant/share/productBonus/buyer/findPage?pageNo=1&pageSize=3`, {}).then(res => {
let order = this.data.goods.currentGoodsType;
wxService.post(`/merchant/share/productBonus/buyer/findPageOrder?pageNo=1&pageSize=3&order=${order}`, {}).then(res => {
if(res){
let list = res.data.data.content ? res.data.data.content : [];
list.map(item => {
......
......@@ -10,11 +10,11 @@ wxService.page({
data: {
goods: {
goodsTypeArr: [
{ name: '最新', type: 2, active: true },
{ name: '最热🔥', type: 3, active: false },
{ name: '推荐👍', type: 1, active: false }
{ name: '最新', type: 'new', active: true },
{ name: '最热🔥', type: 'hot', active: false },
{ name: '推荐👍', type: 'recommend', active: false }
],
currentGoodsType: 2,
currentGoodsType: 'new',
goodsList: []
},
shareModelObj: {
......@@ -69,8 +69,8 @@ wxService.page({
title: '加载中',
mask: true
});
wxService.post(`/merchant/share/productBonus/buyer/findPage?pageNo=1&pageSize=20`, {}).then(res => {
let order = this.data.goods.currentGoodsType;
wxService.post(`/merchant/share/productBonus/buyer/findPageOrder?pageNo=1&pageSize=20&order=${order}`, {}).then(res => {
if (res) {
const { result, data } = res.data
if (result == 0) {
......
......@@ -25,11 +25,11 @@ wxService.page({
},
goods : {
goodsTypeArr: [
{ name: '最新', type: 2, active: true },
{ name: '最热🔥', type: 3, active: false },
{ name: '推荐👍', type: 1, active: false }
{ name: '最新', type: 'new', active: true },
{ name: '最热🔥', type: 'hot', active: false },
{ name: '推荐👍', type: 'recommend', active: false }
],
currentGoodsType: 2,
currentGoodsType: 'new',
goodsList: []
},
......@@ -226,7 +226,12 @@ wxService.page({
//获取商品列表
getGoodsList() {
wxService.post(`/merchant/share/productBonus/buyer/findPage?pageNo=1&pageSize=5`, {}).then(res => {
wx.showLoading({
title: '加载中..',
});
let order = this.data.goods.currentGoodsType;
wxService.post(`/merchant/share/productBonus/buyer/findPageOrder?pageNo=1&pageSize=5&order=${order}`, {}).then(res => {
if (res) {
let list = res.data.data.content ? res.data.data.content : [];
list.map(item => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment