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
Expand all
Hide 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,7 +208,19 @@
...
@@ -208,7 +208,19 @@
},
},
{
{
"path"
:
"index/index"
"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
This diff is collapsed.
Click to expand it.
pages/index/index.vue
View file @
70d758eb
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
<u-icon
name=
"arrow-left"
size=
"44"
></u-icon>
<u-icon
name=
"arrow-left"
size=
"44"
></u-icon>
</view>
</view>
</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"
<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>
: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"
>
<template
v-for=
"(item, i) in myPageData.home_pages.navs"
>
...
@@ -1136,12 +1136,13 @@
...
@@ -1136,12 +1136,13 @@
this
.
$refs
.
city
[
0
].
getPickcar
(
Name
)
this
.
$refs
.
city
[
0
].
getPickcar
(
Name
)
},
},
// yj(){
yj
(){
// uni.navigateTo({
uni
.
navigateTo
({
// url: '/pages/blindDate/editData'
// url: '/pages/blindDate/userList?Sex=0&listStyle=1'
// // url: '/pages/kotra/carrier/list'
url
:
'/pages/coupon/cards/purchase'
// })
// url: '/pages/coupon/cards/list'
// }
})
}
},
},
};
};
</
script
>
</
script
>
...
...
pages/share/salesvolume.vue
View file @
70d758eb
...
@@ -220,7 +220,7 @@
...
@@ -220,7 +220,7 @@
var
myDate
=
new
Date
();
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
())
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天的时间
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
.
cWidth
=
uni
.
upx2px
(
750
);
this
.
cHeight
=
uni
.
upx2px
(
500
);
this
.
cHeight
=
uni
.
upx2px
(
500
);
this
.
init
();
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