Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高淑倩
7-Eleven
Commits
860a385d
Commit
860a385d
authored
Dec 05, 2019
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品接口对接
parent
0913f62c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
16 deletions
+22
-16
home.js
src/shoppingGuid/page/pages/home/home.js
+6
-5
moreProducts.js
src/shoppingGuid/page/pages/moreProducts/moreProducts.js
+6
-6
welfare.js
src/shoppingGuid/page/pages/welfare/welfare.js
+10
-5
No files found.
src/shoppingGuid/page/pages/home/home.js
View file @
860a385d
...
@@ -34,11 +34,11 @@ wxService.page({
...
@@ -34,11 +34,11 @@ wxService.page({
},
},
goods
:
{
goods
:
{
goodsTypeArr
:
[
goodsTypeArr
:
[
{
name
:
'最新'
,
type
:
2
,
active
:
true
},
{
name
:
'最新'
,
type
:
'new'
,
active
:
true
},
{
name
:
'最热🔥'
,
type
:
3
,
active
:
false
},
{
name
:
'最热🔥'
,
type
:
'hot'
,
active
:
false
},
{
name
:
'推荐👍'
,
type
:
1
,
active
:
false
}
{
name
:
'推荐👍'
,
type
:
'recommend'
,
active
:
false
}
],
],
currentGoodsType
:
2
,
currentGoodsType
:
'new'
,
goodsList
:
[]
goodsList
:
[]
},
},
shareModel
:
{
shareModel
:
{
...
@@ -320,7 +320,8 @@ wxService.page({
...
@@ -320,7 +320,8 @@ wxService.page({
wx
.
showLoading
({
wx
.
showLoading
({
title
:
'加载中..'
,
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
){
if
(
res
){
let
list
=
res
.
data
.
data
.
content
?
res
.
data
.
data
.
content
:
[];
let
list
=
res
.
data
.
data
.
content
?
res
.
data
.
data
.
content
:
[];
list
.
map
(
item
=>
{
list
.
map
(
item
=>
{
...
...
src/shoppingGuid/page/pages/moreProducts/moreProducts.js
View file @
860a385d
...
@@ -10,11 +10,11 @@ wxService.page({
...
@@ -10,11 +10,11 @@ wxService.page({
data
:
{
data
:
{
goods
:
{
goods
:
{
goodsTypeArr
:
[
goodsTypeArr
:
[
{
name
:
'最新'
,
type
:
2
,
active
:
true
},
{
name
:
'最新'
,
type
:
'new'
,
active
:
true
},
{
name
:
'最热🔥'
,
type
:
3
,
active
:
false
},
{
name
:
'最热🔥'
,
type
:
'hot'
,
active
:
false
},
{
name
:
'推荐👍'
,
type
:
1
,
active
:
false
}
{
name
:
'推荐👍'
,
type
:
'recommend'
,
active
:
false
}
],
],
currentGoodsType
:
2
,
currentGoodsType
:
'new'
,
goodsList
:
[]
goodsList
:
[]
},
},
shareModelObj
:
{
shareModelObj
:
{
...
@@ -69,8 +69,8 @@ wxService.page({
...
@@ -69,8 +69,8 @@ wxService.page({
title
:
'加载中'
,
title
:
'加载中'
,
mask
:
true
mask
:
true
});
});
let
order
=
this
.
data
.
goods
.
currentGoodsType
;
wxService
.
post
(
`/merchant/share/productBonus/buyer/findPage
?pageNo=1&pageSize=20
`
,
{}).
then
(
res
=>
{
wxService
.
post
(
`/merchant/share/productBonus/buyer/findPage
Order?pageNo=1&pageSize=20&order=
${
order
}
`
,
{}).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
if
(
result
==
0
)
{
...
...
src/shoppingGuid/page/pages/welfare/welfare.js
View file @
860a385d
...
@@ -25,11 +25,11 @@ wxService.page({
...
@@ -25,11 +25,11 @@ wxService.page({
},
},
goods
:
{
goods
:
{
goodsTypeArr
:
[
goodsTypeArr
:
[
{
name
:
'最新'
,
type
:
2
,
active
:
true
},
{
name
:
'最新'
,
type
:
'new'
,
active
:
true
},
{
name
:
'最热🔥'
,
type
:
3
,
active
:
false
},
{
name
:
'最热🔥'
,
type
:
'hot'
,
active
:
false
},
{
name
:
'推荐👍'
,
type
:
1
,
active
:
false
}
{
name
:
'推荐👍'
,
type
:
'recommend'
,
active
:
false
}
],
],
currentGoodsType
:
2
,
currentGoodsType
:
'new'
,
goodsList
:
[]
goodsList
:
[]
},
},
...
@@ -226,7 +226,12 @@ wxService.page({
...
@@ -226,7 +226,12 @@ wxService.page({
//获取商品列表
//获取商品列表
getGoodsList
()
{
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
)
{
if
(
res
)
{
let
list
=
res
.
data
.
data
.
content
?
res
.
data
.
data
.
content
:
[];
let
list
=
res
.
data
.
data
.
content
?
res
.
data
.
data
.
content
:
[];
list
.
map
(
item
=>
{
list
.
map
(
item
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment