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
7620c9d6
Commit
7620c9d6
authored
Aug 25, 2023
by
renjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
判断是否用劵,及用卷使用规则
parent
7350c5dc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
67 additions
and
31 deletions
+67
-31
albumIndex.vue
pages/album/albumIndex.vue
+67
-31
No files found.
pages/album/albumIndex.vue
View file @
7620c9d6
...
@@ -71,15 +71,15 @@
...
@@ -71,15 +71,15 @@
class=
"coupon"
class=
"coupon"
src=
"@/static/img/my/coupon.png"
src=
"@/static/img/my/coupon.png"
mode=
"aspectFit"
mode=
"aspectFit"
@
click=
"
showUseRule
= true"
@
click=
"
couponTip
= true"
v-if=
"isHaveCoupon"
>
v-if=
"isHaveCoupon"
>
</image>
</image>
<u-mask
:show=
"
showt
ip || showUseRule"
>
<u-mask
:show=
"
postCartTip || couponT
ip || showUseRule"
>
<view
class=
"mask"
>
<view
class=
"mask"
>
<view
class=
"img-box"
>
<view
class=
"img-box"
>
<image
class=
"bg"
src=
"@/static/img/my/backgroundIcon01.png"
mode=
"aspectFit"
></image>
<image
class=
"bg"
src=
"@/static/img/my/backgroundIcon01.png"
mode=
"aspectFit"
></image>
<view
class=
"post-card"
v-if=
"
showt
ip"
>
<view
class=
"post-card"
v-if=
"
postCartT
ip"
>
<view
class=
"thank"
>
- 感谢您的参与 -
</view>
<view
class=
"thank"
>
- 感谢您的参与 -
</view>
<view
class=
"tip-content"
>
<view
class=
"tip-content"
>
<text>
免费领取
</text>
<text>
免费领取
</text>
...
@@ -88,6 +88,19 @@
...
@@ -88,6 +88,19 @@
<image
class=
"my-card"
src=
"./static/album/myCard.png"
mode=
"aspectFit"
></image>
<image
class=
"my-card"
src=
"./static/album/myCard.png"
mode=
"aspectFit"
></image>
<view
class=
"address"
>
(领取地址:南站观景台旁)
</view>
<view
class=
"address"
>
(领取地址:南站观景台旁)
</view>
</view>
</view>
<view
class=
"coupon-box"
v-if=
"couponTip"
>
<view
class=
"congra"
>
恭喜您!
</view>
<view
class=
"get-coupon"
>
获得摄影抵用券
<text
class=
"price"
>
20
</text>
元
</view>
<image
class=
"my-card"
src=
"./static/album/myCard.png"
mode=
"aspectFit"
></image>
<view
class=
"use-rule"
@
click=
"showUseRuleClick"
>
使用规则
<u-icon
name=
"arrow-right"
></u-icon>
</view>
<view
class=
"address"
>
(使用地址:长江索道南站观景台旁)
</view>
</view>
<view
class=
"rules"
v-if=
"showUseRule"
>
<view
class=
"rules"
v-if=
"showUseRule"
>
<view
class=
"title"
>
使用规则
</view>
<view
class=
"title"
>
使用规则
</view>
<view
class=
"block"
v-for=
"item in rules"
:key=
"item.ruleName"
>
<view
class=
"block"
v-for=
"item in rules"
:key=
"item.ruleName"
>
...
@@ -122,7 +135,8 @@ export default {
...
@@ -122,7 +135,8 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
showtip
:
false
,
//领取提示
postCartTip
:
false
,
//明信片领取提示
couponTip
:
false
,
//券领取提示
showUseRule
:
false
,
//使用规则提示
showUseRule
:
false
,
//使用规则提示
statusBarHeight
:
0
,
statusBarHeight
:
0
,
capsule
:
0
,
capsule
:
0
,
...
@@ -167,25 +181,7 @@ export default {
...
@@ -167,25 +181,7 @@ export default {
color
:
'#D48D46'
color
:
'#D48D46'
}
}
],
],
rules
:
[
rules
:
[],
//使用规则
{
ruleName
:
'规则说明'
,
contents
:
[
{
value
:
'任意金额皆可抵扣,最高抵扣20'
},
{
value
:
'指定地点可用,提交订单时可自动抵扣'
},
{
value
:
'优惠券只可使用一次,不找零不折现'
},
{
value
:
'仅支持下载电子照片至手机'
},
{
value
:
'如需打印,需额外支付打印费用'
}
]
},
{
ruleName
:
'补充说明'
,
contents
:
[
{
value
:
'使用地址:重庆市渝中区新华路151号长江索道南站观景台旁'
},
{
value
:
'咨询电话:023-68567748'
}
]
}
],
options
:
{}
//路由参数
options
:
{}
//路由参数
}
}
},
},
...
@@ -194,9 +190,14 @@ export default {
...
@@ -194,9 +190,14 @@ export default {
uni
.
navigateBack
({
delta
:
1
})
uni
.
navigateBack
({
delta
:
1
})
},
},
closeMask
()
{
//---关闭遮罩
closeMask
()
{
//---关闭遮罩
this
.
showtip
=
false
this
.
postCartTip
=
false
this
.
couponTip
=
false
this
.
showUseRule
=
false
this
.
showUseRule
=
false
},
},
showUseRuleClick
()
{
this
.
couponTip
=
false
this
.
showUseRule
=
true
},
jumpToScanFaceClick
()
{
//---跳转扫脸页面
jumpToScanFaceClick
()
{
//---跳转扫脸页面
const
openid
=
uni
.
getStorageSync
(
'openid'
)
const
openid
=
uni
.
getStorageSync
(
'openid'
)
...
@@ -296,10 +297,28 @@ export default {
...
@@ -296,10 +297,28 @@ export default {
this
.
$request
(
'wechatUser/myPage/getUserCouponList'
,{
openid
}).
then
(
res
=>
{
this
.
$request
(
'wechatUser/myPage/getUserCouponList'
,{
openid
}).
then
(
res
=>
{
if
(
res
.
code
===
'00'
)
{
if
(
res
.
code
===
'00'
)
{
console
.
log
(
res
.
data
)
res
.
data
.
forEach
(
item
=>
{
res
.
data
.
forEach
(
item
=>
{
if
(
item
.
use
r
Range
===
11
&&
item
.
couponStatus
===
1
)
{
if
(
item
.
useRange
===
11
&&
item
.
couponStatus
===
1
)
{
this
.
isHaveCoupon
=
true
this
.
isHaveCoupon
=
true
// 处理使用规则数据结构
let
ruleContents
=
item
.
couponRule
?
item
.
couponRule
.
split
(
';'
)
:
[]
ruleContents
=
ruleContents
.
map
(
value
=>
{
return
{
value
}
})
this
.
rules
.
push
({
ruleName
:
'规则说明'
,
contents
:
ruleContents
})
let
elseContents
=
item
.
couponRuleRemind
?
item
.
couponRuleRemind
.
split
(
';'
)
:
[]
elseContents
=
elseContents
.
map
(
value
=>
{
return
{
value
}
})
this
.
rules
.
push
({
ruleName
:
'补充说明'
,
contents
:
elseContents
})
}
}
})
})
}
else
{
}
else
{
...
@@ -328,7 +347,7 @@ export default {
...
@@ -328,7 +347,7 @@ export default {
this
.
options
=
options
this
.
options
=
options
if
(
this
.
options
.
tip
===
'true'
)
{
// 从模板选择页进入
if
(
this
.
options
.
tip
===
'true'
)
{
// 从模板选择页进入
this
.
show
=
true
this
.
show
=
true
this
.
showt
ip
=
true
this
.
postCartT
ip
=
true
}
else
if
(
this
.
options
.
index
==
1
)
{
// 从vlog首页进入
}
else
if
(
this
.
options
.
index
==
1
)
{
// 从vlog首页进入
this
.
show
=
true
this
.
show
=
true
}
else
{
// 扫码进入本页
}
else
{
// 扫码进入本页
...
@@ -530,16 +549,17 @@ export default {
...
@@ -530,16 +549,17 @@ export default {
}
}
}
}
.post-card
,
.post-card
,
.coupon-box
,
.rules
{
.rules
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
align-items
:
center
;
align-items
:
center
;
padding
:
66rpx
0
24rpx
0
;
padding
:
66rpx
0
24rpx
0
;
height
:
100%
;
height
:
100%
;
overflow-y
:
auto
;
}
}
.post-card
{
.post-card
{
justify-content
:
space-between
;
justify-content
:
space-between
;
font-size
:
36rpx
;
font-size
:
36rpx
;
.thank
{
.thank
{
font-size
:
28rpx
;
font-size
:
28rpx
;
...
@@ -555,6 +575,25 @@ export default {
...
@@ -555,6 +575,25 @@ export default {
font-weight
:
700
;
font-weight
:
700
;
}
}
}
}
.coupon-box
{
justify-content
:
space-between
;
font-size
:
36rpx
;
.congra
{
font-weight
:
700
;
}
.price
{
font-size
:
64rpx
;
font-weight
:
700
;
color
:
#EE520E
;
}
.use-rule
,
.address
{
font-size
:
24rpx
;
}
.address
{
font-weight
:
700
;
}
}
.rules
{
.rules
{
padding
:
50rpx
32rpx
24rpx
;
padding
:
50rpx
32rpx
24rpx
;
.title
{
.title
{
...
@@ -592,8 +631,5 @@ export default {
...
@@ -592,8 +631,5 @@ export default {
/
deep
/
.u-btn
{
/
deep
/
.u-btn
{
width
:
304rpx
;
width
:
304rpx
;
}
}
}
.rules
{
}
}
</
style
>
</
style
>
\ No newline at end of file
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