Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
groupPurchase-miniapp
Project
Project
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
彭佳妮(贵阳日报)
groupPurchase-miniapp
Commits
a7ea1237
Commit
a7ea1237
authored
Aug 05, 2024
by
石建新(贵阳日报)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改订单接口
parent
fdbfb1a4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
7 deletions
+59
-7
order.js
src/api/order.js
+8
-0
foodClassification.vue
src/pages/index/foodClassification.vue
+40
-6
index.vue
src/pages/index/index.vue
+11
-1
No files found.
src/api/order.js
View file @
a7ea1237
...
...
@@ -61,3 +61,11 @@ export function repaymentApi(data) {
data
,
});
}
// 查询各类订单状态
export
function
sgyOrderGetStatus
(
data
)
{
return
request
({
url
:
'/sgyrdd/sgyOrder/getStatus'
,
method
:
'GET'
,
data
,
});
}
src/pages/index/foodClassification.vue
View file @
a7ea1237
...
...
@@ -3,12 +3,22 @@
<view
class=
"bg-img"
></view>
<view
class=
"top"
>
<!-- 搜索 -->
<Search>
<Search
@
toSearch=
"toSearch"
>
<image
class=
"food"
:src=
"pics"
mode=
"widthFix"
/>
</Search>
<!-- 类别选择 -->
<scroll-view
class=
"scroll-x"
scroll-x=
"true"
@
scroll=
"scroll"
>
<view
class=
"foodCard"
v-for=
"(item, index) in topDiscountedProducts"
:key=
"index"
>
<scroll-view
v-if=
"topDiscountedProducts.length > 0"
class=
"scroll-x"
scroll-x=
"true"
@
scroll=
"scroll"
>
<view
@
click=
"jumpProductDetails(item.prodId)"
class=
"foodCard"
v-for=
"(item, index) in topDiscountedProducts"
:key=
"index"
>
<view
class=
"test5"
>
<image
class=
"img1"
:src=
"imgUrl + item.pic"
/>
<image
class=
"img2"
src=
"../../static/index/icon-tab.png"
/>
...
...
@@ -83,11 +93,11 @@
<!-- 附近筛选 -->
<Position
v-show=
"rotate2"
@
nearby=
"nearby"
@
popular=
"popular"
@
region=
"region"
/>
<!-- 排序筛选 -->
<Sort
v-show=
"rotate3"
/>
<Sort
v-show=
"rotate3"
@
sortParams=
"sortParams"
/>
</view>
<FoodDetails
:cardData=
"cardData"
/>
<view
style=
"width: 100%; text-align: center; font-size: 24rpx; margin-top: 10rpx"
style=
"width: 100%; text-align: center; font-size: 24rpx; margin-top: 10rpx
; color: #888989
"
v-if=
"params.isEnd"
>
没有更多啦~
...
...
@@ -158,6 +168,22 @@ const popular = (communityName) => {
getMerchantList
();
});
};
// 搜索
const
toSearch
=
(
keyword
)
=>
{
params
.
value
.
keyword
=
keyword
;
refresh
().
then
(()
=>
{
getMerchantList
();
});
};
// 排序参数来源
const
sortParams
=
(
sortType
)
=>
{
const
{
sortName
,
sortMode
}
=
sortType
;
params
.
value
.
sortName
=
sortName
;
params
.
value
.
sortMode
=
sortMode
;
refresh
().
then
(()
=>
{
getMerchantList
();
});
};
// area参数来源
const
region
=
(
area
)
=>
{
console
.
log
(
'area'
,
area
);
...
...
@@ -201,6 +227,14 @@ const query = (parentId) => {
categoryData
.
value
=
res
.
data
;
});
};
function
jumpProductDetails
(
prodId
)
{
xma
.
navigateTo
({
url
:
`/pages/packageDetails/packageDetails?prodId=
${
prodId
}
`
,
params
:
{
productId
:
123
,
},
});
}
const
prodSpecialFn
=
()
=>
{
prodSpecial
({
categoryId
:
categoryId
.
value
}).
then
((
res
)
=>
{
res
.
data
.
data
=
res
.
data
.
data
.
map
((
el
)
=>
{
...
...
@@ -302,7 +336,7 @@ page {
}
.top
{
width
:
100%
;
height
:
666
rpx
;
min-height
:
420
rpx
;
border-radius
:
0rpx
0rpx
0rpx
0rpx
;
overflow
:
hidden
;
.food
{
...
...
src/pages/index/index.vue
View file @
a7ea1237
...
...
@@ -76,7 +76,12 @@
</view>
</view>
<view
class=
"nearby-bootom"
>
<view
class=
"contentBox"
v-for=
"(item, index) in foodNearbyData"
:key=
"index"
>
<view
@
click=
"jumpProductDetails(item)"
class=
"contentBox"
v-for=
"(item, index) in foodNearbyData"
:key=
"index"
>
<!--
<image
class=
"img"
src=
"../../static/index/eatFood.png"
mode=
"widthFix"
/>
-->
<image
class=
"img"
:src=
"item.shopLogo"
mode=
"aspectFill"
/>
<text
class=
"one"
>
{{
item
.
shopName
}}
</text>
...
...
@@ -201,6 +206,11 @@ onMounted(() => {
getMerchantList
();
getCouponMainList
();
});
function
jumpProductDetails
(
item
)
{
xma
.
navigateTo
({
url
:
'/pages/shop/shop?shopId='
+
item
.
shopId
,
});
}
// 登录
// const signIn = () => {
// getTokenUser(testJson).then((res) => {
...
...
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