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
476c26af
Commit
476c26af
authored
Aug 20, 2024
by
陈宗胤(贵阳日报)
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.platform.xinhuaapp.com/pengjiani/groupPurchase-miniapp
parents
bb0b02a5
6c87f4a7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
1 deletion
+60
-1
refund.vue
src/pages/order/refund.vue
+1
-0
packageDetails.vue
src/pages/packageDetails/packageDetails.vue
+59
-1
No files found.
src/pages/order/refund.vue
View file @
476c26af
...
...
@@ -123,6 +123,7 @@ const getDetail = async () => {
orderDetail
.
value
.
orderItems
.
forEach
((
item
)
=>
{
count
+=
item
.
prodCount
;
});
orderDetail
.
value
.
prodCount
=
count
;
};
/**
...
...
src/pages/packageDetails/packageDetails.vue
View file @
476c26af
...
...
@@ -156,6 +156,19 @@
</view>
</view>
<!-- card-end -->
<view
class=
"rich-text-card"
>
<text
class=
"title"
>
商品组合
</text>
<view
class=
"product-combination"
v-for=
"(item, index) in productCombination"
:key=
"index"
>
<text
class=
"t-t"
>
{{
item
[
0
].
categorizeName
}}
</text>
<view
class=
"product-combination-box"
v-for=
"(i, n) in item"
:key=
"n"
>
<text
class=
"p-t"
>
{{
i
.
prodName
}}
</text>
<view
class=
"price"
>
<text>
¥
{{
i
.
price
}}
</text>
<text
style=
"margin-left: 30rpx"
>
{{
i
.
count
}}
份
</text>
</view>
</view>
</view>
</view>
<view
class=
"rich-text-card"
>
<text
class=
"title"
>
商品详情
</text>
<rich-text
class=
"desc"
:nodes=
"prodInfo.content"
></rich-text>
...
...
@@ -265,6 +278,7 @@ const shopLocation = ref({});
const
shopId
=
ref
(
''
);
const
showpopup
=
ref
(
false
);
const
backIconColor
=
ref
(
''
);
const
productCombination
=
ref
([]);
const
prodSkusInfo
=
ref
({});
// 商品优惠券
const
productCoupons
=
ref
([]);
...
...
@@ -345,10 +359,26 @@ function getProdDetailFn(prodId) {
prodRlue
.
value
=
res
.
data
.
data
.
groupPurchasePackageRule
;
prodSkusInfo
.
value
=
res
.
data
.
data
.
skus
[
0
];
shopId
.
value
=
res
.
data
.
data
.
prod
.
shopId
;
productCombination
.
value
=
groupByCategorizeName
(
res
.
data
.
data
.
prodAdditionals
);
resolve
(
res
.
data
.
data
.
prod
.
shopId
);
}
});
});
}
// 定义一个函数来根据 categorizeName 字段对数据进行分组
function
groupByCategorizeName
(
prodAdditionals
)
{
if
(
!
Array
.
isArray
(
prodAdditionals
)
||
prodAdditionals
.
length
===
0
)
{
return
[];
}
const
grouped
=
prodAdditionals
.
reduce
((
result
,
item
)
=>
{
if
(
!
result
[
item
.
categorizeName
])
{
result
[
item
.
categorizeName
]
=
[];
}
result
[
item
.
categorizeName
].
push
(
item
);
return
result
;
},
{});
return
Object
.
values
(
grouped
);
}
/**
* 获取商品优惠券列表
...
...
@@ -894,6 +924,34 @@ page {
margin-top
:
10rpx
;
border-radius
:
8
*
2rpx
;
box-shadow
:
0
-8rpx
22
*
2rpx
0
rgba
(
255
,
255
,
255
,
0
.6
);
.product-combination
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
flex-start
;
margin-top
:
20rpx
;
width
:
100%
;
.t-t
{
font-size
:
12
*
2rpx
;
color
:
#151515
;
font-weight
:
bold
;
width
:
100%
;
}
.product-combination-box
{
display
:
flex
;
width
:
100%
;
align-items
:
center
;
justify-content
:
space-between
;
margin-top
:
10rpx
;
.p-t
{
font-size
:
11
*
2rpx
;
color
:
#abaaaa
;
}
.price
{
font-size
:
11
*
2rpx
;
color
:
#abaaaa
;
}
}
}
.desc
{
white-space
:
pre-line
;
}
...
...
@@ -919,7 +977,7 @@ page {
.title
{
font-size
:
13
*
2rpx
;
color
:
#151515
;
font-weight
:
500
;
font-weight
:
bold
;
}
img
{
max-width
:
100%
;
...
...
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