Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
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
viitto
mallapp
Commits
21d5eb9b
Commit
21d5eb9b
authored
Apr 08, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
70d758eb
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
623 additions
and
31 deletions
+623
-31
cashCard.vue
components/coupon/cashCard.vue
+215
-0
postDetails.vue
pages/blindDate/postDetails.vue
+2
-0
cardsreceive.vue
pages/coupon/cards/cardsreceive.vue
+203
-0
list.vue
pages/coupon/cards/list.vue
+73
-12
purchase.vue
pages/coupon/cards/purchase.vue
+56
-15
index.vue
pages/index/index.vue
+7
-0
order-submit.vue
pages/order-submit/order-submit.vue
+67
-4
No files found.
components/coupon/cashCard.vue
0 → 100644
View file @
21d5eb9b
<
template
>
<u-popup
mode=
"bottom"
border-radius=
"20"
:popup=
"false"
v-model=
"show"
:maskCloseAble=
"true"
length=
"auto"
:safeAreaInsetBottom=
"true"
@
close=
"popupClose"
:z-index=
"9999"
close-icon=
"cross"
:closeable=
"true"
>
<view
class=
"coupon"
>
<scroll-view
:scroll-y=
"true"
style=
"max-height: 70vh;"
>
<view
class=
"title"
>
储蓄卡
</view>
<view
class=
"chosentips"
>
请选择要使用的储蓄卡
</view>
<view
class=
"details"
>
<view
class=
"item"
v-for=
"(x, i) in ts"
:key=
"i"
:style=
"
{'margin-bottom':ts.length==i+1?'50px':'10px'}">
<view
class=
"ticket"
>
<view
class=
"miane"
>
<view
class=
"money"
>
</view>
</view>
</view>
<view
class=
"detail"
>
<view
class=
"coupond"
>
<view
class=
"name"
>
{{
x
.
Name
}}
</view>
<view
class=
"date"
>
{{
x
.
SurplusPrice
}}
</view>
<view
class=
"rule"
>
{{
x
.
EndTime
}}
</view>
</view>
<view
class=
"chosen"
>
<u-radio-group
v-model=
"currentChosen"
>
<u-radio
shape=
"circle"
:name=
"x.Id"
:icon-size=
"36"
:active-color=
"mc"
></u-radio>
</u-radio-group>
</view>
</view>
</view>
</view>
</scroll-view>
<view
class=
"btton-box"
>
<u-button
size=
"80"
:ripple=
"true"
shape=
"circle"
:custom-style=
"
{
backgroundColor: mc,
height: '80rpx',
color: '#FFF',
fontSize: '14px',
margin: '0 3vw',
width: '90vw',
}"
@click="popupClose">确定
</u-button>
</view>
</view>
</u-popup>
</
template
>
<
script
>
export
default
{
props
:
[
"list"
,
"current"
],
data
()
{
return
{
mc
:
""
,
show
:
true
,
currentChosen
:
""
,
ts
:
[]
};
},
mounted
()
{
this
.
mc
=
this
.
$uiConfig
.
mainColor
;
this
.
currentChosen
=
this
.
current
;
this
.
ts
=
this
.
list
this
.
ts
.
forEach
(
x
=>
{
x
.
start_time
=
x
.
start_time
.
split
(
' '
)[
0
].
replace
(
/-/g
,
'.'
)
x
.
end_time
=
x
.
end_time
.
split
(
' '
)[
0
].
replace
(
/-/g
,
'.'
)
})
},
methods
:
{
popupClose
()
{
if
(
this
.
currentChosen
!=
this
.
current
)
{
this
.
$emit
(
'close'
,
this
.
currentChosen
)
}
else
{
this
.
$emit
(
'close'
,
-
1
)
}
}
},
};
</
script
>
<
style
>
.coupon
{
max-height
:
70vh
;
background
:
#f5f5f5
;
/* padding-bottom: 50px; */
text-align
:
left
!important
;
border-top-left-radius
:
20
rpx
;
border-top-right-radius
:
20
rpx
;
/* overflow: scroll; */
overflow
:
hidden
;
}
.coupon
.title
{
font-size
:
22px
;
color
:
#000
;
padding
:
20px
;
background
:
#fff
;
}
.coupon
.chosentips
{
padding
:
12px
20px
;
border-bottom
:
1px
solid
#f5f5f5
;
border-top
:
1px
solid
#f5f5f5
;
color
:
#777
;
background
:
#fff
;
font-size
:
12px
;
}
.coupon
.details
{
padding
:
10px
;
display
:
flex
;
flex-direction
:
column
;
}
.coupon
.details
.item
{
display
:
flex
;
margin-bottom
:
10px
;
align-items
:
flex-start
;
background
:
#fff
;
}
.coupon
.details
.item
.ticket
{
position
:
relative
;
background-image
:
linear-gradient
(
to
bottom
right
,
rgb
(
95
,
154
,
220
),
rgb
(
112
,
125
,
195
));
width
:
125px
;
height
:
100px
;
display
:
flex
;
align-items
:
center
;
color
:
#fff
;
}
.coupon
.details
.item
.ticket
.miane
.money
{
font-family
:
"oswald"
;
font-weight
:
bold
;
size
:
64px
;
width
:
125px
;
text-align
:
center
;
}
.coupon
.details
.item
.ticket
.miane
.money
.small
{
font-size
:
20px
;
}
.coupon
.details
.item
.ticket
.miane
.tiaojian
{
font-size
:
14px
;
width
:
125px
;
text-align
:
center
;
}
.coupon
.details
.item
.detail
{
width
:
1px
;
flex
:
1
;
background
:
#fff
;
padding
:
10px
;
display
:
flex
;
align-items
:
flex-end
;
}
.coupon
.details
.item
.detail
.coupond
{
flex
:
1
;
}
.coupon
.details
.item
.detail
.coupond
.name
{
font-size
:
13px
;
font-weight
:
600
;
color
:
#000
;
}
.coupon
.details
.item
.detail
.coupond
.date
{
margin-top
:
5px
;
font-size
:
11px
;
color
:
#777
;
}
.coupon
.details
.item
.detail
.coupond
.rule
{
font-size
:
11px
;
color
:
#777
;
margin-top
:
5px
;
}
.coupon
.details
.item
.detail
.chosen
{
width
:
20px
;
}
.coupon
.details
.item
.ticket
:before
{
content
:
""
;
display
:
block
;
width
:
12px
;
height
:
100%
;
background-size
:
12px
12px
;
/* 一个repeat的大小 */
background-repeat
:
repeat-y
;
background-image
:
radial-gradient
(
#f5f5f5
4px
,
transparent
4px
);
position
:
absolute
;
top
:
0
;
}
.coupon
.details
.item
.ticket
:before
{
left
:
-6px
;
}
.pesongBox
.btton-box
{
height
:
50px
;
display
:
flex
;
padding
:
5px
10px
;
border-top
:
1px
solid
#f5f5f5
;
position
:
fixed
;
bottom
:
0
;
left
:
0
;
right
:
0
;
align-items
:
center
;
background
:
#fff
;
}
</
style
>
pages/blindDate/postDetails.vue
View file @
21d5eb9b
...
@@ -678,6 +678,7 @@
...
@@ -678,6 +678,7 @@
},
},
oneheight
:
0
,
oneheight
:
0
,
ReplyNum
:
0
,
ReplyNum
:
0
,
Up
:
0
,
}
}
},
},
mounted
(){
mounted
(){
...
@@ -693,6 +694,7 @@
...
@@ -693,6 +694,7 @@
withShareTicket
:
true
,
withShareTicket
:
true
,
menus
:
[
"shareAppMessage"
,
"shareTimeline"
],
menus
:
[
"shareAppMessage"
,
"shareTimeline"
],
});
});
this
.
Up
=
uni
.
getStorageSync
(
"mall_UserInfo"
)?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserPageType
:
0
;
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
...
...
pages/coupon/cards/cardsreceive.vue
0 → 100644
View file @
21d5eb9b
<
style
>
.salesvolume
{
background
:
#FFF
;
font-family
:
aa
;
}
.salesvolume
.headStatus
{
overflow
:
hidden
;
position
:
relative
;
width
:
140vw
;
padding-right
:
40vw
;
padding-bottom
:
10px
;
position
:
fixed
;
left
:
0
;
right
:
0
;
top
:
0
;
display
:
flex
;
background
:
#FFFFFF
;
}
.salesvolume
.headStatus
.arrow
{
height
:
24px
;
margin
:
5px
10px
;
width
:
24px
;
}
.salesvolume
.headStatus
.title
{
font-size
:
16px
;
color
:
#000
;
flex
:
1
;
width
:
1px
;
margin-left
:
10px
;
line-height
:
34px
;
}
.salesvolume
.sharebox_top
{
width
:
100vw
;
height
:
100vh
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
position
:
relative
;
overflow
:
hidden
;
}
.salesvolume
.sharebox_top
.sharebox_top_nav
{
width
:
100%
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
line-height
:
34px
;
padding
:
0
10px
;
position
:
fixed
;
left
:
0
;
top
:
0
;
}
.salesvolume
.positext
{
width
:
100%
;
font-size
:
56
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
800
;
color
:
#FFFFFF
;
text-align
:
center
;
background
:
linear-gradient
(
0deg
,
#F40B17
0%
,
#FF5B5A
100%
);
-webkit-background-clip
:
text
;
-webkit-text-fill-color
:
transparent
;
position
:
absolute
;
left
:
0
;
top
:
540
rpx
;
}
.btn
{
width
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
position
:
absolute
;
left
:
0
;
}
</
style
>
<
template
>
<scroll-view
:scroll-y=
"true"
@
scroll=
"scrollHandler"
@
scrolltoupper=
"scrollTopHandler"
style=
"height: 100vh;"
>
<view
class=
"salesvolume"
>
<view
class=
"headStatus"
v-if=
"scrollTop > 50"
:style=
"[
headStyle,
{
zIndex: scrollTop
<
10
?
'
unset
'
:
2
,
opacity:
scrollTop
<
10
?
'
100
'
:
scrollTop
,
},]"
>
<view
class=
"arrow"
@
click=
"redirectPrev"
>
<u-icon
name=
"arrow-left"
size=
"48"
color=
"#000"
></u-icon>
</view>
<view
class=
"title"
v-if=
"scrollTop > 50"
>
{{
pageTitle
}}
</view>
</view>
<view
style=
"width: 100%;height: 100%;"
>
<view
class=
"sharebox_top"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/Shoppingcard.png"
style=
"width: 100vw;height: 100vh;"
></image>
<view
class=
"sharebox_top_nav"
:style=
"
{paddingTop:nav+'px'}">
<view
class=
"arrow"
@
click=
"redirectPrev"
>
<u-icon
name=
"arrow-left"
size=
"48"
color=
"#fff"
></u-icon>
</view>
<view
class=
"title"
style=
"color: #FFFFFF;font-size: 16px;"
>
{{
pageTitle
}}
</view>
<view
style=
"width: 24px;height: 24px;"
></view>
</view>
<view
class=
"positext"
:style=
"
{top:positionTop+'px'}">
¥
<text
style=
"font-size: 130rpx;"
>
{{
money
}}
</text>
</view>
<view
class=
"btn"
:style=
"
{bottom:positionbtnbottom+'px'}" @click="dianjilingqu">
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/Shoppinglingqu.png"
style=
"width: 694rpx;height: 184rpx;"
></image>
</view>
</view>
</view>
</view>
</scroll-view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
pageTitle
:
"赠卡"
,
mainColor
:
""
,
U
:
{},
headStyle
:
{},
scrollTop
:
0
,
nav
:
0
,
ID
:
0
,
money
:
0
,
positionTop
:
0
,
positionbtnbottom
:
0
,
}
},
created
()
{
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
nav
=
uni
.
getMenuButtonBoundingClientRect
().
top
;
this
.
headStyle
.
paddingTop
=
this
.
nav
+
'px'
;
},
onLoad
(
options
)
{
if
(
options
){
console
.
log
(
options
)
this
.
ID
=
options
.
Id
?
options
.
Id
:
0
;
this
.
money
=
options
.
cardsmoney
?
options
.
cardsmoney
:
0
;
}
this
.
positionTop
=
this
.
$utils
.
SystemInfo
().
windowHeight
*
0.39
;
this
.
positionbtnbottom
=
this
.
$utils
.
SystemInfo
().
windowHeight
*
0.085
;
},
methods
:
{
scrollHandler
(
e
)
{
this
.
scrollTop
=
e
.
detail
.
scrollTop
;
},
scrollTopHandler
()
{
this
.
scrollTop
=
0
;
},
redirectPrev
()
{
//返回上一个页面
uni
.
navigateBack
({
delta
:
1
,
});
},
dianjilingqu
(){
console
.
log
(
'领取'
)
this
.
request2
({
url
:
'/api/AppletCoupon/GetReceiveDeposit'
,
data
:
{
Id
:
this
.
ID
}
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
uni
.
showToast
({
title
:
res
.
message
})
setTimeout
(()
=>
{
uni
.
reLaunch
({
url
:
'/pages/coupon/cards/purchase?type=1'
})
},
1000
)
}
}
);
}
}
}
</
script
>
pages/coupon/cards/list.vue
View file @
21d5eb9b
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
<view
class=
"item"
v-for=
"(x, i) in g"
:key=
"i"
>
<view
class=
"item"
v-for=
"(x, i) in g"
:key=
"i"
>
<view
class=
"item-box"
>
<view
class=
"item-box"
>
<image
:src=
'x.CouponIco'
style=
"width: 100%;height: 100%;border-radius: 8px;"
></image>
<image
:src=
'x.CouponIco'
style=
"width: 100%;height: 100%;border-radius: 8px;"
></image>
<view
class=
"itemdw"
@
click=
"gomingxigengduo(x)"
>
<view
class=
"itemdw"
@
click
.
native
.
stop
=
"gomingxigengduo(x)"
>
<view
class=
'itemdw-t'
>
<view
class=
'itemdw-t'
>
<view
style=
"display: flex;"
>
<view
style=
"display: flex;"
>
<checkbox-group
@
change=
"clickcheckbox($event,x,i)"
v-if=
"x.SurplusPrice>0 && getTime(x.EndTime)==true"
>
<checkbox-group
@
change=
"clickcheckbox($event,x,i)"
v-if=
"x.SurplusPrice>0 && getTime(x.EndTime)==true"
>
...
@@ -73,14 +73,14 @@
...
@@ -73,14 +73,14 @@
<view
class=
'itemdw-t'
style=
"align-items: center;font-weight: normal;"
>
<view
class=
'itemdw-t'
style=
"align-items: center;font-weight: normal;"
>
<view
style=
"font-size: 12px;"
>
有效期:
{{
x
.
EndTime
}}
</view>
<view
style=
"font-size: 12px;"
>
有效期:
{{
x
.
EndTime
}}
</view>
<view
style=
"display: flex;"
>
<view
style=
"display: flex;"
>
<view
class=
"itemdw-btn"
@
click
.
native
.
stop=
"
onShareAppMessage(x)"
:style=
"
{background:mainColor}" v-if="x.SendStatus==0
&&
x.SurplusPrice>0
">
<view
class=
"itemdw-btn"
@
click
.
native
.
stop=
"
gofx(x)"
:style=
"
{background:mainColor}" v-if="x.SendStatus==0
&&
x.SurplusPrice>0
&&
x.DepositPrice == x.SurplusPrice
">
赠送
赠送
<!--
<button
open-type=
"share"
class=
"contButton"
></button>
-->
</view>
</view>
<view
class=
"itemdw-btn"
@
click
.
native
.
stop=
"gofx(x)"
:style=
"
{background:mainColor}" v-if="x.SendStatus==2
&&
x.SurplusPrice>0">
<view
class=
"itemdw-btn"
@
click
.
native
.
stop=
"gofx(x)"
:style=
"
{background:mainColor}" v-if="x.SendStatus==2
&&
x.SurplusPrice>0
&&
x.DepositPrice == x.SurplusPrice
">
赠送中
赠送中
</view>
</view>
<view
class=
"itemdw-btn"
:style=
"
{color:mainColor}" v-if="x.SurplusPrice>0
&&
getTime(x.EndTime)==true">
<view
class=
"itemdw-btn"
@
click
.
native
.
stop=
"gohome()"
:style=
"
{color:mainColor}" v-if="x.SurplusPrice>0
&&
getTime(x.EndTime)==true">
消费
消费
</view>
</view>
</view>
</view>
...
@@ -107,6 +107,26 @@
...
@@ -107,6 +107,26 @@
</view>
</view>
<!-- 取消提示 -->
<!-- 取消提示 -->
<u-toast
ref=
"uToast"
/>
<u-toast
ref=
"uToast"
/>
<u-popup
v-model=
"show"
mode=
"center"
length=
"70%"
:mask-close-able=
'false'
>
<view
style=
"width: 100%;height: 100%;background: #FFF;"
>
<view
style=
"width: 100%;height: 35px;text-align: center;line-height: 45px;"
>
提示
</view>
<view
style=
"padding: 15px;"
>
是否赠送价值¥
{{
onShare
.
money
}}
元的储值卡
</view>
<view
style=
"width: 100%;height: 1px;background: #ECECEC;"
></view>
<view
style=
"width: 100%;height: 45px;display: flex;align-items: center;"
>
<view
style=
"width: 50%;height: 100%;text-align: center;line-height: 45px;"
@
click=
"show=false"
>
取消
</view>
<view
style=
"width: 50%;height: 100%;text-align: center;line-height: 45px;position: relative;"
@
click=
"show=false"
>
赠送
<button
open-type=
"share"
class=
"contButton"
></button>
<view
style=
"width: 1px;height: 100%;background: #ECECEC;position: absolute;left: -0.5px;top: 0;"
></view>
</view>
</view>
</view>
</u-popup>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
'gbAuth'
></auth>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
'gbAuth'
></auth>
</view>
</view>
</
template
>
</
template
>
...
@@ -119,6 +139,7 @@
...
@@ -119,6 +139,7 @@
},
},
data
()
{
data
()
{
return
{
return
{
show
:
false
,
pageTitle
:
"我的储蓄卡"
,
pageTitle
:
"我的储蓄卡"
,
showAuth
:
false
,
showAuth
:
false
,
U
:
{},
U
:
{},
...
@@ -144,12 +165,27 @@
...
@@ -144,12 +165,27 @@
title
:
''
,
title
:
''
,
path
:
''
,
path
:
''
,
img
:
''
,
img
:
''
,
}
money
:
0
,
},
uid
:
0
,
SmallShopId
:
0
,
Up
:
0
,
};
};
},
},
created
()
{
created
()
{
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
-
40
)
+
"px"
;
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
-
40
)
+
"px"
;
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
let
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
this
.
uid
=
u
.
UserId
?
u
.
UserId
:
0
;
if
(
this
.
uid
==
0
){
this
.
uid
=
uni
.
getStorageSync
(
"pid"
)?
uni
.
getStorageSync
(
"pid"
).
pid
:
0
}
this
.
SmallShopId
=
u
.
SmallShopId
?
u
.
SmallShopId
:
0
;
if
(
this
.
SmallShopId
==
0
){
//如果微店id为0 去找所属微店id
this
.
SmallShopId
=
u
.
UserSmallShopId
?
u
.
UserSmallShopId
:
0
}
this
.
Up
=
uni
.
getStorageSync
(
"mall_UserInfo"
)?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserPageType
:
0
;
},
},
mounted
()
{
mounted
()
{
let
currentPages
=
getCurrentPages
();
let
currentPages
=
getCurrentPages
();
...
@@ -289,16 +325,41 @@
...
@@ -289,16 +325,41 @@
})
})
},
},
onShareAppMessage
()
{
onShareAppMessage
()
{
console
.
log
(
this
.
onShare
.
path
)
return
{
return
{
title
:
this
.
onShare
.
title
,
title
:
this
.
onShare
.
title
,
path
:
this
.
onShare
.
path
,
path
:
this
.
onShare
.
path
,
imageUrl
:
this
.
onShare
.
img
,
imageUrl
:
this
.
onShare
.
img
,
};
};
},
},
gofx
(
x
){
gofx
(
x
){
this
.
request2
({
url
:
'/api/AppletCoupon/GetGiveDeposit'
,
data
:
{
Id
:
x
.
Id
}
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
//可以赠送
this
.
onShare
.
title
=
x
.
Name
this
.
onShare
.
title
=
x
.
Name
this
.
onShare
.
img
=
x
.
CouponIco
this
.
onShare
.
img
=
x
.
CouponIco
;
this
.
onShareAppMessage
()
this
.
onShare
.
money
=
x
.
SurplusPrice
;
this
.
onShare
.
path
=
"/pages/index/index?id="
+
x
.
Id
+
"&user_id="
+
this
.
uid
+
"&SmallShopId="
+
this
.
SmallShopId
+
"&Up="
+
this
.
Up
+
"&money="
+
x
.
SurplusPrice
+
'&JumpType=12'
this
.
show
=
true
}
else
{
uni
.
showToast
({
icon
:
'none'
,
title
:
"暂不支持赠送"
})
}
}
);
},
gohome
(){
//跳转到首页去消费
uni
.
reLaunch
({
url
:
'/pages/index/index'
})
}
}
},
},
...
...
pages/coupon/cards/purchase.vue
View file @
21d5eb9b
...
@@ -170,11 +170,11 @@
...
@@ -170,11 +170,11 @@
</view>
</view>
<view
class=
"top-nav-c"
>
<view
class=
"top-nav-c"
>
<view>
<view>
<view
style=
"font-size: 17px;color: #961C08;font-weight: bold;"
>
储值卡总额
{{
AllUseDeposit
.
SurplusPrice
}}
元
</view>
<view
style=
"font-size: 17px;color: #961C08;font-weight: bold;"
>
储值卡总额
{{
AllUseDeposit
.
SurplusPrice
?
AllUseDeposit
.
SurplusPrice
:
0
}}
元
</view>
<view
style=
"font-size: 12px;color: #B65646;margin-top: 15rpx;"
>
累计充值
{{
AllUseDeposit
.
DepositPrice
}}
元
</view>
<view
style=
"font-size: 12px;color: #B65646;margin-top: 15rpx;"
>
累计充值
{{
AllUseDeposit
.
DepositPrice
?
AllUseDeposit
.
DepositPrice
:
0
}}
元
</view>
</view>
</view>
<view
class=
"top-nav-c-r"
@
click=
"golist"
style=
"max-width: 240rpx;"
>
<view
class=
"top-nav-c-r"
@
click=
"golist"
style=
"max-width: 240rpx;"
>
储值卡(
{{
AllUseDeposit
.
DepositNum
}}
张)
储值卡(
{{
AllUseDeposit
.
DepositNum
?
AllUseDeposit
.
DepositNum
:
0
}}
张)
<u-icon
name=
"arrow"
color=
"#B65646"
size=
"30"
></u-icon>
<u-icon
name=
"arrow"
color=
"#B65646"
size=
"30"
></u-icon>
</view>
</view>
</view>
</view>
...
@@ -230,16 +230,23 @@
...
@@ -230,16 +230,23 @@
</view>
</view>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
'gbAuth'
></auth>
</scroll-view>
</scroll-view>
</
template
>
</
template
>
<
script
>
<
script
>
import
auth
from
"../../../components/auth/index.vue"
;
export
default
{
export
default
{
components
:
{
auth
},
data
()
{
data
()
{
return
{
return
{
pageTitle
:
"储蓄卡"
,
pageTitle
:
"储蓄卡"
,
show
:
false
,
show
:
false
,
mainColor
:
""
,
mainColor
:
""
,
showAuth
:
false
,
U
:
{},
headStyle
:
{},
headStyle
:
{},
scrollTop
:
0
,
scrollTop
:
0
,
nav
:
0
,
nav
:
0
,
...
@@ -257,17 +264,44 @@
...
@@ -257,17 +264,44 @@
orderInfo
:{},
orderInfo
:{},
balanceList
:[],
//流水列表
balanceList
:[],
//流水列表
AllUseDeposit
:{},
//基础资料
AllUseDeposit
:{},
//基础资料
type
:
0
,
//是否是从领取页面过来的
}
}
},
},
created
()
{
created
()
{
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
nav
=
uni
.
getMenuButtonBoundingClientRect
().
top
;
this
.
nav
=
uni
.
getMenuButtonBoundingClientRect
().
top
;
this
.
headStyle
.
paddingTop
=
this
.
nav
+
'px'
;
this
.
headStyle
.
paddingTop
=
this
.
nav
+
'px'
;
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
if
(
!
this
.
u
)
{
this
.
u
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
};
this
.
showAuth
=
true
;
}
else
{
this
.
getDepositPageList
()
this
.
getDepositPageList
()
this
.
getdetailed
()
//明细
this
.
getdetailed
()
//明细
this
.
getxq
()
//详情
this
.
getxq
()
//详情
}
},
onLoad
(
options
)
{
if
(
options
&&
options
.
type
){
this
.
type
=
options
.
type
}
},
},
methods
:
{
methods
:
{
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
// this.showAuth=false;
this
.
getDepositPageList
()
this
.
getdetailed
()
//明细
this
.
getxq
()
//详情
},
//关闭登录窗口
gbAuth
()
{
uni
.
navigateBack
()
},
goxuanze
(
x
){
goxuanze
(
x
){
this
.
Paymsg
.
DepositId
=
x
.
ID
this
.
Paymsg
.
DepositId
=
x
.
ID
this
.
Paymsg
.
SalePrice
=
x
.
SalePrice
this
.
Paymsg
.
SalePrice
=
x
.
SalePrice
...
@@ -279,9 +313,16 @@
...
@@ -279,9 +313,16 @@
this
.
scrollTop
=
0
;
this
.
scrollTop
=
0
;
},
},
redirectPrev
()
{
//返回上一个页面
redirectPrev
()
{
//返回上一个页面
if
(
this
.
type
==
0
){
uni
.
navigateBack
({
uni
.
navigateBack
({
delta
:
1
,
delta
:
1
,
});
});
}
else
{
uni
.
reLaunch
({
url
:
'/pages/index/index'
})
}
},
},
getxq
(){
getxq
(){
this
.
request2
({
this
.
request2
({
...
...
pages/index/index.vue
View file @
21d5eb9b
...
@@ -163,6 +163,7 @@
...
@@ -163,6 +163,7 @@
showStart
:
false
,
//是否显示启动页
showStart
:
false
,
//是否显示启动页
startData
:{},
startData
:{},
ComeFrom
:
''
,
ComeFrom
:
''
,
cardsmoney
:
0
,
//储值卡带过来的金额
};
};
},
},
components
:
{
components
:
{
...
@@ -202,6 +203,7 @@
...
@@ -202,6 +203,7 @@
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
let
that
=
this
;
let
that
=
this
;
// options = {id:3,money:123,JumpType:12}
uni
.
getSystemInfo
({
uni
.
getSystemInfo
({
success
(
res
)
{
success
(
res
)
{
that
.
titleStyle
=
{
that
.
titleStyle
=
{
...
@@ -339,6 +341,9 @@
...
@@ -339,6 +341,9 @@
}
else
{
}
else
{
this
.
GoodsId
=
options
.
GoodsId
?
options
.
GoodsId
:
29
;
this
.
GoodsId
=
options
.
GoodsId
?
options
.
GoodsId
:
29
;
}
}
if
(
options
&&
options
.
money
)
{
//储值卡
this
.
cardsmoney
=
options
.
money
;
}
if
(
options
&&
options
.
OrderId
)
{
//代付订单id
if
(
options
&&
options
.
OrderId
)
{
//代付订单id
this
.
OrderId
=
options
.
OrderId
;
this
.
OrderId
=
options
.
OrderId
;
}
}
...
@@ -729,6 +734,8 @@
...
@@ -729,6 +734,8 @@
uni
.
navigateTo
({
url
:
"/pages/blindDate/postDetails?Id="
+
that
.
GoodsId
});
uni
.
navigateTo
({
url
:
"/pages/blindDate/postDetails?Id="
+
that
.
GoodsId
});
}
else
if
(
that
.
JumpType
==
11
){
//用户详情
}
else
if
(
that
.
JumpType
==
11
){
//用户详情
uni
.
navigateTo
({
url
:
"/pages/blindDate/persondetails?UserId="
+
that
.
GoodsId
});
uni
.
navigateTo
({
url
:
"/pages/blindDate/persondetails?UserId="
+
that
.
GoodsId
});
}
else
if
(
that
.
JumpType
==
12
){
//储值卡的领取
uni
.
navigateTo
({
url
:
"/pages/coupon/cards/cardsreceive?Id="
+
that
.
GoodsId
+
'&cardsmoney='
+
this
.
cardsmoney
});
}
}
},
500
);
},
500
);
...
...
pages/order-submit/order-submit.vue
View file @
21d5eb9b
...
@@ -126,6 +126,15 @@
...
@@ -126,6 +126,15 @@
<u-icon
name=
"ellipsis"
size=
"36"
v-if=
"couponList.length > 0"
@
click=
"showCouponHandler"
></u-icon>
<u-icon
name=
"ellipsis"
size=
"36"
v-if=
"couponList.length > 0"
@
click=
"showCouponHandler"
></u-icon>
</view>
</view>
</view>
</view>
<view
class=
"filed"
>
<view
class=
"left"
>
储蓄卡
</view>
<view
class=
"right"
>
<text
class=
"content"
v-if=
"mchs[0].deposit.use_deposit_id == 0 && cashCardList.length>0"
@
click=
"showcashcardbtn"
>
选择储蓄卡
</text>
<text
class=
"content"
v-else-if=
"cashCardList.length==0"
>
暂无储蓄卡
</text>
<text
class=
"content"
v-else
:style=
"{ color: mc }"
@
click=
"showcashcardbtn"
>
已优惠{{ mchs[0].deposit.deposit_price }}元
</text>
<u-icon
name=
"ellipsis"
size=
"36"
v-if=
"cashCardList.length > 0"
@
click=
"showcashcardbtn"
></u-icon>
</view>
</view>
<view
class=
"filed"
v-if=
"integral.can_use"
>
<view
class=
"filed"
v-if=
"integral.can_use"
>
<view
class=
"left"
>
积分抵扣
</view>
<view
class=
"left"
>
积分抵扣
</view>
<view
class=
"right"
>
<view
class=
"right"
>
...
@@ -155,6 +164,12 @@
...
@@ -155,6 +164,12 @@
<text
class=
"price"
:style=
"{ color: mc }"
>
-¥{{ couponPrice.toFixed(2) }}
</text>
<text
class=
"price"
:style=
"{ color: mc }"
>
-¥{{ couponPrice.toFixed(2) }}
</text>
</view>
</view>
</view>
</view>
<view
class=
"filed"
>
<view
class=
"left"
>
储值卡扣除
</view>
<view
class=
"right"
>
<text
class=
"price"
:style=
"{ color: mc }"
>
-¥{{ cashPrice.toFixed(2) }}
</text>
</view>
</view>
<view
class=
"filed"
v-if=
"mchs.length>0&&mchs[0].is_deduction_commission"
>
<view
class=
"filed"
v-if=
"mchs.length>0&&mchs[0].is_deduction_commission"
>
<view
class=
"left"
>
佣金抵扣
</view>
<view
class=
"left"
>
佣金抵扣
</view>
<view
class=
"right"
>
<view
class=
"right"
>
...
@@ -187,8 +202,11 @@
...
@@ -187,8 +202,11 @@
</u-button>
</u-button>
</view>
</view>
</view>
</view>
<coupon
v-if=
"couponList.length > 0 && showCoupon"
:list=
"couponList"
:current=
"form
Data.list[0].user_coupon_i
d"
<coupon
v-if=
"couponList.length > 0 && showCoupon"
:list=
"couponList"
:current=
"form
data.User_Coupon_I
d"
@
close=
"closeCouponHandler"
></coupon>
@
close=
"closeCouponHandler"
></coupon>
<cashCard
v-if=
"cashCardList.length > 0 && showcashcard"
:list=
"cashCardList"
:current=
"formdata.Use_Deposit_Id"
@
close=
"closecashcard"
></cashCard>
<view
class=
"notOption"
v-if=
"submitOrder"
></view>
<view
class=
"notOption"
v-if=
"submitOrder"
></view>
<good-list
:list=
"goodData"
v-if=
"showGoodList"
@
close=
"closeGoodListHandler"
></good-list>
<good-list
:list=
"goodData"
v-if=
"showGoodList"
@
close=
"closeGoodListHandler"
></good-list>
<payCom
v-if=
"payBtn"
:payInfo=
"payInfo"
@
closePay=
"closePay"
></payCom>
<payCom
v-if=
"payBtn"
:payInfo=
"payInfo"
@
closePay=
"closePay"
></payCom>
...
@@ -237,13 +255,15 @@
...
@@ -237,13 +255,15 @@
import
payCom
from
'@/components/pay/pay'
;
import
payCom
from
'@/components/pay/pay'
;
import
peisong
from
'@/components/peisong/index'
;
import
peisong
from
'@/components/peisong/index'
;
import
coupon
from
'@/components/coupon/index'
;
import
coupon
from
'@/components/coupon/index'
;
import
cashCard
from
'@/components/coupon/cashCard'
;
//储蓄卡
import
goodList
from
'@/components/goods/order-good-list'
;
import
goodList
from
'@/components/goods/order-good-list'
;
export
default
{
export
default
{
components
:
{
components
:
{
payCom
,
payCom
,
peisong
,
peisong
,
coupon
,
coupon
,
goodList
goodList
,
cashCard
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -263,7 +283,8 @@
...
@@ -263,7 +283,8 @@
remark
:
''
,
remark
:
''
,
order_form
:
[],
order_form
:
[],
use_integral
:
0
,
use_integral
:
0
,
user_coupon_id
:
0
user_coupon_id
:
0
,
use_deposit_id
:
0
,
}],
}],
address_id
:
0
address_id
:
0
},
},
...
@@ -279,6 +300,7 @@
...
@@ -279,6 +300,7 @@
expressPrice
:
0.0
,
expressPrice
:
0.0
,
goodPrice
:
0.0
,
goodPrice
:
0.0
,
couponPrice
:
0.0
,
couponPrice
:
0.0
,
cashPrice
:
0.0
,
integral
:
{
integral
:
{
can_use
:
false
,
can_use
:
false
,
use
:
false
,
use
:
false
,
...
@@ -308,7 +330,11 @@
...
@@ -308,7 +330,11 @@
BuyerMessage
:
''
,
BuyerMessage
:
''
,
showReviceModal
:
false
,
showReviceModal
:
false
,
//抵扣金额
//抵扣金额
deduction_commission
:
0
deduction_commission
:
0
,
cashCardList
:[],
showcashcard
:
false
,
onecoupon
:
true
,
//第一次进页面的时候选最优的优惠券
};
};
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
...
@@ -318,6 +344,7 @@
...
@@ -318,6 +344,7 @@
if
(
option
.
formData
)
{
if
(
option
.
formData
)
{
this
.
formData
=
JSON
.
parse
(
decodeURIComponent
(
option
.
formData
));
this
.
formData
=
JSON
.
parse
(
decodeURIComponent
(
option
.
formData
));
this
.
formdata
=
JSON
.
parse
(
decodeURIComponent
(
option
.
formData
));
this
.
formdata
=
JSON
.
parse
(
decodeURIComponent
(
option
.
formData
));
this
.
formdata
.
Use_Deposit_Id
=
0
;
//储值卡ID 2021-4-8加的
}
}
if
(
option
.
IsFormShoppingCart
)
{
if
(
option
.
IsFormShoppingCart
)
{
this
.
IsFormShoppingCart
=
option
.
IsFormShoppingCart
;
this
.
IsFormShoppingCart
=
option
.
IsFormShoppingCart
;
...
@@ -394,6 +421,9 @@
...
@@ -394,6 +421,9 @@
form
.
DeliveryMethod
=
that
.
formdata
.
DeliveryMethod
;
form
.
DeliveryMethod
=
that
.
formdata
.
DeliveryMethod
;
form
.
DetailList
=
that
.
DetailList
;
form
.
DetailList
=
that
.
DetailList
;
form
.
User_Coupon_Id
=
that
.
formdata
.
User_Coupon_Id
;
form
.
User_Coupon_Id
=
that
.
formdata
.
User_Coupon_Id
;
form
.
Use_Deposit_Id
=
that
.
formdata
.
Use_Deposit_Id
;
form
.
DepositMoney
=
that
.
cashPrice
;
//储值卡抵扣金额
form
.
DepositFreightMoney
=
that
.
expressPrice
;
//储值卡抵扣运费
form
.
CouponMoney
=
that
.
couponPrice
;
form
.
CouponMoney
=
that
.
couponPrice
;
form
.
FreightMoney
=
that
.
expressPrice
;
form
.
FreightMoney
=
that
.
expressPrice
;
form
.
Income
=
that
.
ds
.
total_price
;
form
.
Income
=
that
.
ds
.
total_price
;
...
@@ -452,9 +482,19 @@
...
@@ -452,9 +482,19 @@
}
}
this
.
showCoupon
=
false
;
this
.
showCoupon
=
false
;
},
},
closecashcard
(
e
){
if
(
e
!=
-
1
)
{
this
.
formdata
.
Use_Deposit_Id
=
e
;
this
.
init
();
}
this
.
showcashcard
=
false
;
},
showCouponHandler
()
{
showCouponHandler
()
{
this
.
showCoupon
=
true
;
this
.
showCoupon
=
true
;
},
},
showcashcardbtn
(){
this
.
showcashcard
=
true
;
},
initCoupon
()
{
initCoupon
()
{
let
ProductList
=
[];
let
ProductList
=
[];
this
.
DetailList
=
[];
this
.
DetailList
=
[];
...
@@ -485,6 +525,27 @@
...
@@ -485,6 +525,27 @@
res
=>
{
res
=>
{
if
(
res
.
resultCode
==
1
)
{
if
(
res
.
resultCode
==
1
)
{
this
.
couponList
=
res
.
data
;
this
.
couponList
=
res
.
data
;
if
(
this
.
onecoupon
==
true
){
this
.
onecoupon
=
false
this
.
couponList
.
map
(
x
=>
{
if
(
x
.
isBest
==
1
){
//进去页面优先选择优惠券
this
.
formdata
.
User_Coupon_Id
=
x
.
id
this
.
init
()
return
}
})
}
}
}
);
//获取用户储蓄卡
this
.
request2
({
url
:
'/api/AppletCoupon/GetNoUseDeposit'
,
data
:
{}
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
cashCardList
=
res
.
data
;
}
}
}
}
);
);
...
@@ -556,6 +617,7 @@
...
@@ -556,6 +617,7 @@
this
.
expressPrice
=
0.0
;
this
.
expressPrice
=
0.0
;
this
.
goodPrice
=
0.0
;
this
.
goodPrice
=
0.0
;
this
.
couponPrice
=
0.0
;
this
.
couponPrice
=
0.0
;
this
.
cashPrice
=
0.0
;
if
(
res
.
data
.
total_price
<
0
)
{
if
(
res
.
data
.
total_price
<
0
)
{
this
.
ds
.
total_price
=
0
this
.
ds
.
total_price
=
0
}
}
...
@@ -593,6 +655,7 @@
...
@@ -593,6 +655,7 @@
this
.
goodPrice
+=
parseFloat
(
x
.
total_goods_price
);
this
.
goodPrice
+=
parseFloat
(
x
.
total_goods_price
);
this
.
expressPrice
+=
parseFloat
(
x
.
express_price
);
this
.
expressPrice
+=
parseFloat
(
x
.
express_price
);
this
.
couponPrice
+=
parseFloat
(
x
.
coupon
.
coupon_discount
||
0.0
);
this
.
couponPrice
+=
parseFloat
(
x
.
coupon
.
coupon_discount
||
0.0
);
this
.
cashPrice
+=
parseFloat
(
x
.
deposit
.
deposit_price
||
0.0
);
if
(
x
.
integral
.
can_use
)
{
if
(
x
.
integral
.
can_use
)
{
this
.
integral
.
can_use
=
true
;
this
.
integral
.
can_use
=
true
;
this
.
integral
.
use
=
false
;
this
.
integral
.
use
=
false
;
...
...
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