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
8e52bf70
Commit
8e52bf70
authored
May 23, 2020
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改商品活动
parent
a01c820e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
0 deletions
+29
-0
confirmOrder.js
src/pages/confirmOrder/confirmOrder.js
+5
-0
confirmOrder.wxml
src/pages/confirmOrder/confirmOrder.wxml
+6
-0
confirmOrder.wxss
src/pages/confirmOrder/confirmOrder.wxss
+18
-0
No files found.
src/pages/confirmOrder/confirmOrder.js
View file @
8e52bf70
...
@@ -789,10 +789,15 @@ wxService.page({
...
@@ -789,10 +789,15 @@ wxService.page({
if
(
result
==
0
)
{
if
(
result
==
0
)
{
wx
.
hideLoading
()
wx
.
hideLoading
()
let
skuList
=
data
.
tradePreviewSkus
;
let
skuList
=
data
.
tradePreviewSkus
;
//参与活动列表
let
skuPromotionList
=
data
.
skuPromotions
?
data
.
skuPromotions
:
[];
let
sum
=
0
let
sum
=
0
skuList
.
forEach
((
item
,
index
)
=>
{
skuList
.
forEach
((
item
,
index
)
=>
{
// item.price
// item.price
sum
+=
skuList
[
index
].
price
*
skuList
[
index
].
count
;
sum
+=
skuList
[
index
].
price
*
skuList
[
index
].
count
;
//查找促销活动
let
skuPromotions
=
skuPromotionList
.
filter
(
sp
=>
sp
.
skuId
==
item
.
skuId
);
item
.
skuPromotions
=
skuPromotions
;
});
});
this
.
data
.
totalGoodsPrice
=
sum
;
this
.
data
.
totalGoodsPrice
=
sum
;
...
...
src/pages/confirmOrder/confirmOrder.wxml
View file @
8e52bf70
...
@@ -93,6 +93,12 @@
...
@@ -93,6 +93,12 @@
<text class="price">¥{{item.price}}</text>
<text class="price">¥{{item.price}}</text>
<text class="number">x {{item.count}}</text>
<text class="number">x {{item.count}}</text>
</view>
</view>
<view class="promotion-tags" wx:if="{{item.skuPromotions.length != 0}}">
<view class="promotion-level-name"
wx:for="{{item.skuPromotions}}"
wx:key="*this"
wx:for-item="skuPromotion">{{skuPromotion.levelDesc}}</view>
</view>
</view>
</view>
</view>
</view>
</block>
</block>
...
...
src/pages/confirmOrder/confirmOrder.wxss
View file @
8e52bf70
...
@@ -492,6 +492,24 @@
...
@@ -492,6 +492,24 @@
margin-left: 14rpx;
margin-left: 14rpx;
}
}
.promotion-tags{
display: flex;
align-items: center;
flex-wrap: wrap;
margin-top: 10rpx;
}
.promotion-tags .promotion-level-name{
width: auto;
height: auto;
padding: 5rpx 15rpx;
font-size: 20rpx;
background: rgba(203,60,60,0.3);
color: #cb3c3c;
margin-right: 15rpx;
border-radius: 4rpx;
}
.clear-box{
.clear-box{
box-sizing: border-box;
box-sizing: border-box;
-webkit-box-sizing: border-box;
-webkit-box-sizing: border-box;
...
...
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