Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
U
uni-pdtravel
Project
Project
Details
Activity
Releases
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
panyongping
uni-pdtravel
Commits
4a6857f1
Commit
4a6857f1
authored
Aug 18, 2023
by
qipeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的影集 新增接口 优惠券
parent
5d9cf187
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
3 deletions
+33
-3
myPhotoAlbum.vue
pages/album/myPhotoAlbum/myPhotoAlbum.vue
+33
-3
No files found.
pages/album/myPhotoAlbum/myPhotoAlbum.vue
View file @
4a6857f1
...
...
@@ -166,6 +166,7 @@ export default {
favorablePrice
:
0
,
//优惠
priceNum
:
0
,
//选购了多少照片
merchantMessage
:[],
//景区基础参数
masterSlaveCouponList
:[],
//优惠券
}
},
onLoad
(
option
)
{
...
...
@@ -243,8 +244,10 @@ export default {
this
.
previewData
=
res
.
data
this
.
previewData
.
forEach
((
item
,
index
)
=>
{
item
[
'checkType'
]
=
false
if
(
item
.
sellingPrice
!=
null
){
this
.
originalPrice
=
item
.
originalPrice
//原价.
this
.
sellingPrice
=
item
.
sellingPrice
//售价
}
item
[
'image'
]
=
item
.
faceSourceUrl
||
item
.
faceAiUrl
item
[
'title'
]
=
''
})
...
...
@@ -312,10 +315,34 @@ export default {
if
(
item
.
checkType
==
true
){
this
.
originalPrices
+=
item
.
originalPrice
//原价
this
.
sellingPrices
+=
item
.
sellingPrice
//售价
console
.
log
(
item
.
sellingPrice
)
this
.
priceNum
++
}
})
//金额是否达到优惠券资格
var
data
=
{
openid
:
this
.
openid
,
//用户ID
money
:
this
.
sellingPrices
,
//当前选购金额
singleMoney
:
this
.
sellingPrices
,
//当前选购金额
merchantId
:
this
.
merchantMessage
[
0
].
merchantId
,
tickets
:
1
,
productId
:
this
.
merchantMessage
[
0
].
merchantExtendProjectId
,
}
this
.
$request
(
'wechatUser/myPage/usableCouponList'
,
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
){
res
.
data
.
masterSlaveCouponList
.
forEach
(
item
=>
{
item
[
'couponPrice'
]
=
item
.
deductPrice
})
this
.
masterSlaveCouponList
=
res
.
data
.
masterSlaveCouponList
this
.
favorablePrice
=
this
.
masterSlaveCouponList
[
0
].
deductPrice
this
.
sellingPrices
=
this
.
sellingPrices
-
this
.
masterSlaveCouponList
[
0
].
deductPrice
}
else
{
this
.
$refs
.
uToast
.
show
({
title
:
res
.
message
,
type
:
'error'
,
})
}
})
},
projectMoreFun
()
{
//更多产品显示
if
(
this
.
projectMoreType
==
false
)
{
...
...
@@ -350,7 +377,10 @@ export default {
extendContent
:
''
,
unitPrice
:
this
.
sellingPrice
,
//产品单价
orderImgList
:[],
////订单图片
couponList
:[],
//券信息
}
orderProductListData
.
couponList
.
push
(
this
.
masterSlaveCouponList
[
0
])
this
.
previewData
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
checkType
==
true
){
var
imgList
=
{
...
...
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