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
70d758eb
Commit
70d758eb
authored
Apr 07, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
b5d81295
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
971 additions
and
9 deletions
+971
-9
pages.json
pages.json
+13
-1
carddetailed.vue
pages/coupon/cards/carddetailed.vue
+215
-0
list.vue
pages/coupon/cards/list.vue
+353
-0
purchase.vue
pages/coupon/cards/purchase.vue
+381
-0
index.vue
pages/index/index.vue
+8
-7
salesvolume.vue
pages/share/salesvolume.vue
+1
-1
No files found.
pages.json
View file @
70d758eb
...
...
@@ -208,6 +208,18 @@
},
{
"path"
:
"index/index"
},
{
"path"
:
"cards/list"
//储蓄卡列表
},
{
"path"
:
"cards/carddetailed"
//卡片明细
},
{
"path"
:
"cards/purchase"
,
//购买储蓄卡
"style"
:
{
"navigationStyle"
:
"custom"
}
}
]
},
...
...
pages/coupon/cards/carddetailed.vue
0 → 100644
View file @
70d758eb
<
style
>
.cardsdStyle
.mingxilist
{
margin-top
:
15px
;
display
:
flex
;
width
:
100%
;
justify-content
:
space-between
;
padding
:
0
15px
;
}
.mingxilist-l
{
width
:
calc
(
100vw
-
60
rpx
-
30px
-
50px
);
font-size
:
15px
;
color
:
#000000
;
}
.mingxilist-r
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
flex-end
;
font-size
:
15px
;
color
:
#000000
;
font-weight
:
bold
;
}
</
style
>
<
template
>
<view
class=
"cardsdStyle"
:style=
"
{ height: contentHeight }">
<u-empty
v-if=
"g.length == 0"
text=
"暂无相关数据"
mode=
"coupon"
></u-empty>
<view
v-if=
"g.length > 0"
style=
"
height: calc(100vh);
width: calc(100vw);
overflow: hidden;
"
>
<scroll-view
:scroll-y=
"true"
:enable-back-to-top=
"true"
:enable-flex=
"true"
@
scrolltolower=
"lower"
:style=
"
{ height: '100%' }">
<view
class=
"couponList"
>
<view
class=
"mingxilist"
v-for=
"(x, i) in g"
:key=
"i"
>
<view
class=
"mingxilist-l"
>
<view
class=
"oneText"
style=
"text-align: left;"
>
{{
x
.
Remarks
}}
</view>
<view
style=
"font-size: 12px;color: #BCBCBC;"
>
{{
x
.
CreateDate
}}
</view>
</view>
<view
class=
"mingxilist-r"
>
<view
v-if=
"x.Type== 1"
:style=
"
{color:mainColor}">+
{{
x
.
Surplus
-
x
.
Balance
}}
</view>
<view
v-if=
"x.Type== 2"
>
-
{{
x
.
Balance
-
x
.
Surplus
}}
</view>
<!--
<view
style=
"font-size: 12px;color: #F44235;font-weight: normal;"
>
{{
x
.
Remarks
}}
</view>
-->
</view>
</view>
</view>
<u-loadmore
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"#f3f4f6"
/>
</scroll-view>
</view>
<!-- 加载中 -->
<view
class=
"loading"
v-if=
"loading"
>
<u-loading
mode=
"flower"
size=
"48"
>
>
</u-loading>
<Text
style=
"color: #fff; margin-top: 10rpx;"
>
加载中...
</Text>
</view>
<!-- 取消提示 -->
<u-toast
ref=
"uToast"
/>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
'gbAuth'
></auth>
</view>
</
template
>
<
script
>
import
auth
from
"../../../components/auth/index.vue"
;
export
default
{
components
:
{
auth
},
data
()
{
return
{
pageTitle
:
"卡片明细"
,
showAuth
:
false
,
U
:
{},
mainColor
:
""
,
contentHeight
:
0
,
msg
:
{
pageIndex
:
1
,
pageSize
:
20
,
OldDepositBuyId
:
0
,
},
page_count
:
1
,
g
:
[],
loading
:
false
,
status
:
"loadmore"
,
loadText
:
{
loadmore
:
"轻轻上拉,加载更多"
,
loading
:
"努力加载中"
,
nomore
:
"没有更多了"
,
},
};
},
created
()
{
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
-
40
)
+
"px"
;
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
},
mounted
()
{
let
currentPages
=
getCurrentPages
();
let
u
=
"/"
+
currentPages
[
currentPages
.
length
-
1
].
route
;
let
pages
=
wx
.
getStorageSync
(
"basedata"
)
?
wx
.
getStorageSync
(
"basedata"
).
bar_title
:
[];
pages
.
forEach
((
x
)
=>
{
if
(
x
.
value
==
u
)
{
this
.
pageTitle
=
x
.
new_name
?
x
.
new_name
:
x
.
name
;
}
});
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
});
},
onLoad
:
function
(
option
)
{
if
(
option
&&
option
.
ID
){
this
.
msg
.
OldDepositBuyId
=
option
.
ID
}
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
if
(
!
this
.
u
)
{
this
.
u
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
};
this
.
showAuth
=
true
;
}
else
{
this
.
init
();
}
},
methods
:
{
init
()
{
this
.
request2
({
url
:
'/api/AppletCoupon/GetDepositBalancePageList'
,
data
:
this
.
msg
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
loading
=
false
;
res
.
data
.
pageData
.
forEach
(
x
=>
{
x
.
ischecked
=
false
})
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
this
.
page_count
=
res
.
data
.
pageCount
;
if
(
this
.
page_count
==
1
)
{
this
.
status
=
"nomore"
;
}
}
}
);
},
lower
(
e
)
{
if
(
this
.
msg
.
pageIndex
<
this
.
page_count
)
{
this
.
msg
.
pageIndex
++
;
this
.
status
=
"loading"
;
this
.
init
();
}
else
{
this
.
status
=
"nomore"
;
}
},
},
};
</
script
>
<
style
>
.cardsdStyle
{
width
:
100%
;
height
:
100%
;
background
:
#f3f4f6
;
position
:
relative
;
}
.cardsdStyle
.loading
{
width
:
180
rpx
;
height
:
180
rpx
;
background
:
#000000
;
opacity
:
0.7
;
border-radius
:
10
rpx
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
position
:
fixed
;
left
:
50%
;
top
:
30%
;
margin-left
:
-100
rpx
;
z-index
:
999
;
}
.cardsdStyle
.couponList
{
width
:
100%
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
}
.cardsdStyle
.item
{
display
:
flex
;
margin-top
:
15px
;
align-items
:
flex-start
;
background
:
#fff
;
width
:
94%
;
border-radius
:
12
rpx
;
overflow
:
hidden
;
}
</
style
>
pages/coupon/cards/list.vue
0 → 100644
View file @
70d758eb
<
style
>
.item-box
{
width
:
100%
;
height
:
195px
;
border-radius
:
8px
;
overflow
:
hidden
;
position
:
relative
;
}
.itemdw
{
width
:
100%
;
height
:
195px
;
position
:
absolute
;
left
:
0
;
top
:
0
;
padding
:
15px
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-between
;
}
.itemdw-t
{
display
:
flex
;
align-items
:
flex-start
;
font-size
:
17px
;
color
:
#FFF
;
font-weight
:
bold
;
justify-content
:
space-between
;
}
.itemdw-btn
{
width
:
160
rpx
;
height
:
62
rpx
;
border-radius
:
30
rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
margin-left
:
10px
;
font-size
:
14px
;
background
:
#FFF
;
color
:
#FFFFFF
;
position
:
relative
;
}
</
style
>
<
template
>
<view
class=
"cardslistStyle"
:style=
"
{ height: contentHeight }">
<u-empty
v-if=
"g.length == 0"
text=
"暂无相关储蓄卡"
mode=
"coupon"
></u-empty>
<view
v-if=
"g.length > 0"
style=
"
height: calc(100vh - 50px);
width: calc(100vw);
overflow: hidden;
"
>
<scroll-view
:scroll-y=
"true"
:enable-back-to-top=
"true"
:enable-flex=
"true"
@
scrolltolower=
"lower"
:style=
"
{ height: '100%' }">
<view
class=
"couponList"
>
<view
class=
"item"
v-for=
"(x, i) in g"
:key=
"i"
>
<view
class=
"item-box"
>
<image
:src=
'x.CouponIco'
style=
"width: 100%;height: 100%;border-radius: 8px;"
></image>
<view
class=
"itemdw"
@
click=
"gomingxigengduo(x)"
>
<view
class=
'itemdw-t'
>
<view
style=
"display: flex;"
>
<checkbox-group
@
change=
"clickcheckbox($event,x,i)"
v-if=
"x.SurplusPrice>0 && getTime(x.EndTime)==true"
>
<label
class=
"uni-list-cell uni-list-cell-pd"
>
<view>
<checkbox
:value=
"x.Id"
:checked=
"x.ischecked"
:color=
"mainColor"
style=
"transform:scale(0.7)"
/>
</view>
</label>
</checkbox-group>
{{
x
.
Name
}}
</view>
<view
style=
"display: flex;align-items: flex-end;"
>
<text
style=
"margin-bottom: 3px;"
>
¥
</text>
<text
style=
"font-size: 26px;color: #FFF;"
>
{{
x
.
SurplusPrice
}}
</text>
</view>
</view>
<view
class=
'itemdw-t'
style=
"align-items: center;font-weight: normal;"
>
<view
style=
"font-size: 12px;"
>
有效期:
{{
x
.
EndTime
}}
</view>
<view
style=
"display: flex;"
>
<view
class=
"itemdw-btn"
@
click
.
native
.
stop=
"onShareAppMessage(x)"
:style=
"
{background:mainColor}" v-if="x.SendStatus==0
&&
x.SurplusPrice>0">
赠送
<!--
<button
open-type=
"share"
class=
"contButton"
></button>
-->
</view>
<view
class=
"itemdw-btn"
@
click
.
native
.
stop=
"gofx(x)"
:style=
"
{background:mainColor}" v-if="x.SendStatus==2
&&
x.SurplusPrice>0">
赠送中
</view>
<view
class=
"itemdw-btn"
:style=
"
{color:mainColor}" v-if="x.SurplusPrice>0
&&
getTime(x.EndTime)==true">
消费
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<u-loadmore
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"#f3f4f6"
/>
</scroll-view>
</view>
<view
style=
"width: 100%;height: 50px;background: #FFFFFF;display: flex;align-items: center;justify-content: center;position: absolute;left: 0;bottom: 0;"
@
click=
"goUrl"
>
<Text>
去合并(
{{
mergeNumber
}}
)
</Text>
</view>
<!-- 加载中 -->
<view
class=
"loading"
v-if=
"loading"
>
<u-loading
mode=
"flower"
size=
"48"
>
>
</u-loading>
<Text
style=
"color: #fff; margin-top: 10rpx;"
>
加载中...
</Text>
</view>
<!-- 取消提示 -->
<u-toast
ref=
"uToast"
/>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
'gbAuth'
></auth>
</view>
</
template
>
<
script
>
import
auth
from
"../../../components/auth/index.vue"
;
export
default
{
components
:
{
auth
},
data
()
{
return
{
pageTitle
:
"我的储蓄卡"
,
showAuth
:
false
,
U
:
{},
mainColor
:
""
,
contentHeight
:
0
,
msg
:
{
pageIndex
:
1
,
pageSize
:
50
,
},
page_count
:
1
,
g
:
[],
loading
:
false
,
status
:
"loadmore"
,
loadText
:
{
loadmore
:
"轻轻上拉,加载更多"
,
loading
:
"努力加载中"
,
nomore
:
"没有更多了"
,
},
mergeNumber
:
0
,
//合并数量
Ids
:[],
onShare
:{
title
:
''
,
path
:
''
,
img
:
''
,
}
};
},
created
()
{
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
-
40
)
+
"px"
;
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
},
mounted
()
{
let
currentPages
=
getCurrentPages
();
let
u
=
"/"
+
currentPages
[
currentPages
.
length
-
1
].
route
;
let
pages
=
wx
.
getStorageSync
(
"basedata"
)
?
wx
.
getStorageSync
(
"basedata"
).
bar_title
:
[];
pages
.
forEach
((
x
)
=>
{
if
(
x
.
value
==
u
)
{
this
.
pageTitle
=
x
.
new_name
?
x
.
new_name
:
x
.
name
;
}
});
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
});
},
onLoad
:
function
(
option
)
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
if
(
!
this
.
u
)
{
this
.
u
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
};
this
.
showAuth
=
true
;
}
else
{
this
.
init
();
}
},
methods
:
{
init
()
{
this
.
request2
({
url
:
'/api/AppletCoupon/GetDepositBuyPageList'
,
data
:
this
.
msg
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
loading
=
false
;
res
.
data
.
pageData
.
forEach
(
x
=>
{
x
.
ischecked
=
false
})
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
this
.
page_count
=
res
.
data
.
pageCount
;
if
(
this
.
page_count
==
1
)
{
this
.
status
=
"nomore"
;
}
}
}
);
},
clickcheckbox
(
e
,
x
,
i
){
var
items
=
this
.
g
;
let
values
=
e
.
detail
.
value
;
if
(
values
.
length
>
0
){
this
.
mergeNumber
++
this
.
Ids
=
this
.
Ids
.
concat
(
values
)
}
else
{
this
.
mergeNumber
--
this
.
Ids
.
map
((
item
,
index
)
=>
{
if
(
item
==
x
.
Id
){
this
.
Ids
.
splice
(
index
,
1
);
return
}
})
}
},
lower
(
e
)
{
if
(
this
.
msg
.
pageIndex
<
this
.
page_count
)
{
this
.
msg
.
pageIndex
++
;
this
.
status
=
"loading"
;
this
.
init
();
}
else
{
this
.
status
=
"nomore"
;
}
},
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
// this.showAuth=false;
this
.
init
();
},
//关闭登录窗口
gbAuth
()
{
uni
.
navigateBack
()
},
getTime
(
x
){
let
type
=
true
if
((
new
Date
()).
getTime
()
>
(
new
Date
(
x
)).
getTime
()){
type
=
false
}
return
type
},
goUrl
()
{
if
(
this
.
mergeNumber
>
0
){
if
(
this
.
Ids
.
length
<
2
){
uni
.
showToast
({
icon
:
'none'
,
title
:
"至少选择2个合并"
})
}
else
{
let
msg
=
this
.
Ids
.
join
(
','
)
this
.
request2
({
url
:
'/api/AppletCoupon/GetMergeDeposit'
,
data
:
{
Ids
:
msg
}
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
uni
.
showToast
({
icon
:
'none'
,
title
:
res
.
message
})
this
.
msg
.
pageIndex
=
1
;
this
.
g
=
[]
this
.
init
();
}
}
);
}
}
else
{
uni
.
showToast
({
icon
:
'none'
,
title
:
"选择合并的储值卡"
})
}
},
gomingxigengduo
(
x
){
uni
.
navigateTo
({
url
:
'/pages/coupon/cards/carddetailed?ID='
+
x
.
Id
})
},
onShareAppMessage
()
{
return
{
title
:
this
.
onShare
.
title
,
path
:
this
.
onShare
.
path
,
imageUrl
:
this
.
onShare
.
img
,
};
},
gofx
(
x
){
this
.
onShare
.
title
=
x
.
Name
this
.
onShare
.
img
=
x
.
CouponIco
this
.
onShareAppMessage
()
}
},
};
</
script
>
<
style
>
.cardslistStyle
{
width
:
100%
;
height
:
100%
;
background
:
#f3f4f6
;
position
:
relative
;
}
.cardslistStyle
.loading
{
width
:
180
rpx
;
height
:
180
rpx
;
background
:
#000000
;
opacity
:
0.7
;
border-radius
:
10
rpx
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
position
:
fixed
;
left
:
50%
;
top
:
30%
;
margin-left
:
-100
rpx
;
z-index
:
999
;
}
.cardslistStyle
.couponList
{
width
:
100%
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
}
.cardslistStyle
.item
{
display
:
flex
;
margin-top
:
15px
;
align-items
:
flex-start
;
background
:
#fff
;
width
:
94%
;
border-radius
:
12
rpx
;
overflow
:
hidden
;
}
.cardslistStyle
.contButton
{
width
:
100%
;
height
:
100%
;
position
:
absolute
;
left
:
0
;
top
:
0
;
opacity
:
0
;
}
</
style
>
pages/coupon/cards/purchase.vue
0 → 100644
View file @
70d758eb
<
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
:
100%
;
height
:
316
rpx
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
background
:
linear-gradient
(
90deg
,
#F89A60
,
#E38358
);
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
;
}
.top-nav-c
{
width
:
690
rpx
;
height
:
150
rpx
;
position
:
absolute
;
left
:
30
rpx
;
bottom
:
0
;
box-shadow
:
0px
0px
19px
0px
rgba
(
204
,
70
,
50
,
0.46
);
background
:
linear-gradient
(
90deg
,
#FFCF91
,
#FFC291
);
border-radius
:
13px
;
padding
:
26
rpx
34
rpx
;
display
:
flex
;
justify-content
:
space-between
;
}
.salesvolume
.goumai
{
width
:
690
rpx
;
margin-left
:
30
rpx
;
background
:
#FFFFFF
;
box-shadow
:
0px
0px
22px
0px
rgba
(
116
,
116
,
116
,
0.18
);
border-radius
:
10px
;
padding
:
15px
;
margin-top
:
13px
;
}
.top-nav-c-r
{
display
:
flex
;
align-items
:
center
;
height
:
60
rpx
;
border-radius
:
30
rpx
;
background
:
rgba
(
233
,
109
,
70
,
0.2
);
padding
:
0
12px
;
font-size
:
24
rpx
;
color
:
#B65646
;
}
.salesvolume
.goumailist
{
display
:
-webkit-box
;
overflow-x
:
scroll
;
-webkit-overflow-scrolling
:
touch
;
margin-top
:
10px
;
}
/* 隐藏下方的滚动条 */
.goumailist
::-webkit-scrollbar
{
background-color
:
transparent
;
}
.salesvolume
.list-item
{
width
:
200
rpx
;
height
:
150
rpx
;
border
:
1px
solid
#FAC88C
;
border-radius
:
6px
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
margin-right
:
7px
;
}
.salesvolume
.oneText
{
overflow
:
hidden
;
display
:
inline-block
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
width
:
100%
;
text-align
:
center
;
}
.chongzhi
{
width
:
90%
;
height
:
42px
;
border-radius
:
21px
;
font-size
:
17px
;
color
:
#FFF
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
margin-left
:
5%
;
}
.salesvolume
.mingxilist
{
margin-top
:
15px
;
display
:
flex
;
width
:
100%
;
justify-content
:
space-between
;
}
.mingxilist-l
{
width
:
calc
(
100vw
-
60
rpx
-
30px
-
50px
);
font-size
:
15px
;
color
:
#000000
;
}
.mingxilist-r
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
flex-end
;
font-size
:
15px
;
color
:
#000000
;
font-weight
:
bold
;
}
</
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"
>
<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=
"top-nav-c"
>
<view>
<view
style=
"font-size: 17px;color: #961C08;font-weight: bold;"
>
储值卡总额
{{
AllUseDeposit
.
SurplusPrice
}}
元
</view>
<view
style=
"font-size: 12px;color: #B65646;margin-top: 15rpx;"
>
累计充值
{{
AllUseDeposit
.
DepositPrice
}}
元
</view>
</view>
<view
class=
"top-nav-c-r"
@
click=
"golist"
style=
"max-width: 240rpx;"
>
储值卡(
{{
AllUseDeposit
.
DepositNum
}}
张)
<u-icon
name=
"arrow"
color=
"#B65646"
size=
"30"
></u-icon>
</view>
</view>
<image
src=
"../../../static/images/icon/card-bottom.png"
style=
"width: 100%;height: 13px;position: absolute;left: 0;bottom: 0;"
></image>
</view>
<view
class=
"goumai"
>
<view
style=
"display: flex;"
>
<text
style=
"font-size: 17px;color: #000000;font-weight: bold;"
>
储值卡购买
</text>
<text
style=
"font-size: 12px;color: #919191;line-height: 28px;margin-left: 5px;"
>
储值卡永久有效
</text>
</view>
<view
class=
"goumailist"
v-if=
"Deposit.length>0"
>
<view
class=
"list-item"
v-for=
"(x,i) in Deposit"
:key=
'i'
@
click=
"goxuanze(x)"
:style=
"
{'border':'1px solid'+ (x.ID==Paymsg.DepositId?'#ED723A':'#FAC88C'),background:(x.ID==Paymsg.DepositId?'linear-gradient(to bottom, #fff1df, #ffcb91)':'transparent')}">
<view
class=
"oneText"
style=
"display: flex;align-items: flex-end;"
>
<view
class=
"oneText"
style=
"font-size: 24rpx;color: #961C08;width: 100%;"
>
充¥
<text
style=
"font-size: 44rpx;color: #961C08;font-weight: bold;line-height: 42rpx;"
>
{{
x
.
DepositPrice
}}
</text>
</view>
</view>
<view
class=
"oneText"
style=
"font-size:28rpx;color: #FF0000 ;margin-top: 5px;font-weight: bold;"
>
付¥
{{
x
.
SalePrice
}}
</view>
</view>
</view>
<view
class=
"chongzhi"
:style=
"
{background:mainColor}" @click="gocz">
充值支付¥
{{
Paymsg
.
SalePrice
}}
</view>
</view>
<view
class=
"goumai"
style=
"margin-bottom: 30px;"
>
<view
style=
"display: flex;justify-content: space-between;align-items: center;"
>
<text
style=
"font-size: 17px;color: #000000;font-weight: bold;"
>
卡片明细
</text>
<view
@
click=
"gomingxigengduo"
style=
"font-size: 14px;color: #919191;line-height: 28px;display: flex;align-items: center;margin-right: 3px;"
>
查看更多
<u-icon
name=
"arrow"
color=
"#919191"
size=
"20"
></u-icon>
</view>
</view>
<u-empty
v-if=
"balanceList.length == 0"
text=
"暂无数据"
mode=
"coupon"
></u-empty>
<view
class=
"mingxilist"
v-for=
"(x, i) in balanceList"
:key=
"i"
>
<view
class=
"mingxilist-l"
>
<view
class=
"oneText"
style=
"text-align: left;"
>
{{
x
.
Remarks
}}
</view>
<view
style=
"font-size: 12px;color: #BCBCBC;"
>
{{
x
.
CreateDate
}}
</view>
</view>
<view
class=
"mingxilist-r"
>
<view
v-if=
"x.Type== 1"
:style=
"
{color:mainColor}">+
{{
x
.
Surplus
-
x
.
Balance
}}
</view>
<view
v-if=
"x.Type== 2"
>
-
{{
x
.
Balance
-
x
.
Surplus
}}
</view>
<!--
<view
style=
"font-size: 12px;color: #F44235;font-weight: normal;"
>
{{
x
.
Remarks
}}
</view>
-->
</view>
</view>
</view>
</view>
<u-modal
v-model=
"show"
:content=
"content"
:show-cancel-button=
'true'
@
confirm=
'queren'
></u-modal>
</view>
</scroll-view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
pageTitle
:
"储蓄卡"
,
show
:
false
,
mainColor
:
""
,
headStyle
:
{},
scrollTop
:
0
,
nav
:
0
,
msg
:{
pageIndex
:
1
,
pageSize
:
999999
,
},
Deposit
:[],
Paymsg
:{
PayWay
:
1
,
SalePrice
:
0
,
DepositId
:
0
,
},
content
:
''
,
orderInfo
:{},
balanceList
:[],
//流水列表
AllUseDeposit
:{},
//基础资料
}
},
created
()
{
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
nav
=
uni
.
getMenuButtonBoundingClientRect
().
top
;
this
.
headStyle
.
paddingTop
=
this
.
nav
+
'px'
;
this
.
getDepositPageList
()
this
.
getdetailed
()
//明细
this
.
getxq
()
//详情
},
methods
:
{
goxuanze
(
x
){
this
.
Paymsg
.
DepositId
=
x
.
ID
this
.
Paymsg
.
SalePrice
=
x
.
SalePrice
},
scrollHandler
(
e
)
{
this
.
scrollTop
=
e
.
detail
.
scrollTop
;
},
scrollTopHandler
()
{
this
.
scrollTop
=
0
;
},
redirectPrev
()
{
//返回上一个页面
uni
.
navigateBack
({
delta
:
1
,
});
},
getxq
(){
this
.
request2
({
url
:
'/api/AppletCoupon/GetAllUseDeposit'
,
data
:
{}
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
AllUseDeposit
=
res
.
data
}
}
);
},
getDepositPageList
(){
this
.
request2
({
url
:
'/api/AppletCoupon/GetDepositPageList'
,
data
:
this
.
msg
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
Deposit
=
res
.
data
.
pageData
;
if
(
this
.
Deposit
.
length
>
0
){
//进入页面默认选择第一个
this
.
Paymsg
.
DepositId
=
this
.
Deposit
[
0
].
ID
this
.
Paymsg
.
SalePrice
=
this
.
Deposit
[
0
].
SalePrice
}
}
}
);
},
getdetailed
(){
this
.
request2
({
url
:
'/api/AppletCoupon/GetDepositBalancePageList'
,
data
:
{
pageIndex
:
1
,
pageSize
:
10
,
OldDepositBuyId
:
0
}
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
balanceList
=
res
.
data
.
pageData
}
}
);
},
golist
(){
uni
.
navigateTo
({
url
:
'/pages/coupon/cards/list'
})
},
gocz
(){
this
.
content
=
'确定花费'
+
this
.
Paymsg
.
SalePrice
+
'元充值吗?'
this
.
show
=
true
;
},
queren
(){
let
url
=
'/api/WeChatPay/GetDepositPayInfo'
this
.
request2
({
url
:
url
,
data
:
this
.
Paymsg
},
res
=>
{
this
.
orderInfo
=
JSON
.
parse
(
res
.
data
);
this
.
Pay
()
}
);
},
Pay
(){
let
that
=
this
;
let
orderInfo
=
that
.
orderInfo
;
uni
.
requestPayment
({
provider
:
'wxpay'
,
timeStamp
:
this
.
orderInfo
.
timeStamp
,
nonceStr
:
this
.
orderInfo
.
nonceStr
,
package
:
this
.
orderInfo
.
package
,
signType
:
this
.
orderInfo
.
signType
,
paySign
:
this
.
orderInfo
.
sign
,
success
:
function
(
res
)
{
console
.
log
(
'success'
,
res
);
uni
.
showToast
({
title
:
"支付成功"
})
// that.getdianshu()
},
fail
:
function
(
err
)
{
console
.
log
(
'fail:'
,
err
);
uni
.
showToast
({
icon
:
'none'
,
title
:
"支付失败"
})
}
});
},
gomingxigengduo
(){
//明细更多
uni
.
navigateTo
({
url
:
'/pages/coupon/cards/carddetailed'
})
}
}
}
</
script
>
pages/index/index.vue
View file @
70d758eb
...
...
@@ -18,7 +18,7 @@
<u-icon
name=
"arrow-left"
size=
"44"
></u-icon>
</view>
</view>
<
!--
<view
@
click=
'yj'
style=
"width: 200px;height: 50px;"
>
活动
</view>
--
>
<
view
@
click=
'yj'
style=
"width: 200px;height: 50px;"
>
活动
</view
>
<u-tabs
v-if=
"myPageData.home_pages && myPageData.home_pages.navs.length > 1"
name=
"name"
:list=
"myPageData.home_pages.navs"
:is-scroll=
"true"
:active-color=
"mainColor"
:current=
"active"
:bar-width=
"80"
:font-size=
"32"
:bold=
"false"
@
change=
"changeHandler"
></u-tabs>
<template
v-for=
"(item, i) in myPageData.home_pages.navs"
>
...
...
@@ -1136,12 +1136,13 @@
this
.
$refs
.
city
[
0
].
getPickcar
(
Name
)
},
// yj(){
// uni.navigateTo({
// url: '/pages/blindDate/editData'
// // url: '/pages/kotra/carrier/list'
// })
// }
yj
(){
uni
.
navigateTo
({
// url: '/pages/blindDate/userList?Sex=0&listStyle=1'
url
:
'/pages/coupon/cards/purchase'
// url: '/pages/coupon/cards/list'
})
}
},
};
</
script
>
...
...
pages/share/salesvolume.vue
View file @
70d758eb
...
...
@@ -220,7 +220,7 @@
var
myDate
=
new
Date
();
this
.
msg
.
EndTime
=
myDate
.
getFullYear
()
+
'-'
+
((
myDate
.
getMonth
()
+
1
)
<
10
?
'0'
+
(
myDate
.
getMonth
()
+
1
):(
myDate
.
getMonth
()
+
1
))
+
'-'
+
(
myDate
.
getDate
()
<
10
?
'0'
+
myDate
.
getDate
():
myDate
.
getDate
())
var
startDate
=
new
Date
(
myDate
.
setDate
(
myDate
.
getDate
()
-
7
))
//计算当前时间的前7天的时间
this
.
msg
.
StartTime
=
startDate
.
getFullYear
()
+
'-'
+
((
myDate
.
getMonth
()
+
1
)
<
10
?
'0'
+
(
myDate
.
getMonth
()
+
1
):(
myDate
.
getMonth
()
+
1
))
+
'-'
+
(
myDate
.
getDate
()
<
10
?
'0'
+
myDate
.
getDate
():
my
Date
.
getDate
())
this
.
msg
.
StartTime
=
startDate
.
getFullYear
()
+
'-'
+
((
startDate
.
getMonth
()
+
1
)
<
10
?
'0'
+
(
startDate
.
getMonth
()
+
1
):(
startDate
.
getMonth
()
+
1
))
+
'-'
+
(
startDate
.
getDate
()
<
10
?
'0'
+
startDate
.
getDate
():
start
Date
.
getDate
())
this
.
cWidth
=
uni
.
upx2px
(
750
);
this
.
cHeight
=
uni
.
upx2px
(
500
);
this
.
init
();
...
...
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