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
123de04a
Commit
123de04a
authored
Jun 11, 2020
by
zhangjianguo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
会员中心
parent
51006dee
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
296 additions
and
55 deletions
+296
-55
pages.json
pages.json
+11
-0
balance.vue
pages/balance/balance.vue
+61
-31
detail.vue
pages/balance/detail.vue
+16
-22
index.vue
pages/member/index/index.vue
+143
-0
privilege.vue
pages/member/privilege.vue
+40
-0
user-center.vue
pages/user-center/user-center.vue
+25
-2
banner.png
static/images/icon/banner.png
+0
-0
card-bottom.png
static/images/icon/card-bottom.png
+0
-0
privilegebg.jpeg
static/images/icon/privilegebg.jpeg
+0
-0
No files found.
pages.json
View file @
123de04a
...
...
@@ -29,6 +29,7 @@
{
"path"
:
"pages/webbox/webbox"
}
],
"subPackages"
:
[{
"root"
:
"pages/goods"
,
...
...
@@ -47,6 +48,16 @@
}
]
},
{
"root"
:
"pages/member"
,
"pages"
:
[{
"path"
:
"index/index"
},
{
"path"
:
"privilege"
}
]
},
{
"root"
:
"pages/balance"
,
"pages"
:
[{
...
...
pages/balance/balance.vue
View file @
123de04a
...
...
@@ -30,27 +30,31 @@
@
scrolltolower=
"lower"
:style=
"
{ height: '100%' }">
<view
style=
"display: flex;flex-direction: column;align-items: center;"
>
<view
v-for=
"(item, index) in logsList"
:key=
"index"
class=
'logsList'
@
click=
"godetail(item
.id
)"
>
<view
v-for=
"(item, index) in logsList"
:key=
"index"
class=
'logsList'
@
click=
"godetail(item)"
>
<view
class=
"logsList_l"
>
<Text
class=
'l_name'
>
{{
item
.
desc
}}
</Text>
<Text
style=
'font-size: 13px;color: #666;'
>
{{
item
.
created_at
}}
</Text>
<Text
class=
'l_name'
>
{{
item
.
Description
}}
</Text>
<Text
style=
'font-size: 13px;color: #666;'
>
{{
item
.
CreateDate
}}
</Text>
</view>
<view
class=
"logsList_r"
>
<Text
:style=
"
{color:item.
type==1 ? mainColor:'#6ABE60'}">
{{
item
.
type
==
1
?
'+'
:
'-'
}}{{
item
.
money
}}
</Text>
<Text
:style=
"
{color:item.
Type==1 ? mainColor:'#6ABE60'}">
{{
item
.
Type
==
1
?
'+'
:
'-'
}}{{
item
.
Balance
}}
</Text>
</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>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
'goback'
></auth>
<view
class=
"loading"
v-if=
"load"
>
<u-loading
mode=
"flower"
size=
"48"
></u-loading>
<Text
style=
'color: #fff;margin-top: 10rpx;'
>
加载中...
</Text>
</view>
</view>
</
template
>
...
...
@@ -60,7 +64,7 @@
data
()
{
return
{
pageTitle
:
"余额记录"
,
load
:
false
,
showAuth
:
false
,
contentHeight
:
0
,
mainColor
:
""
,
...
...
@@ -69,6 +73,18 @@
date
:
''
,
date2
:
''
,
logsList
:[],
msg
:{
pageIndex
:
1
,
pageSize
:
10
,
CreateDate
:
''
},
page_count
:
1
,
status
:
"loadmore"
,
loadText
:
{
loadmore
:
"轻轻上拉,加载更多"
,
loading
:
"努力加载中"
,
nomore
:
"没有更多了"
,
},
}
},
components
:{
...
...
@@ -114,7 +130,7 @@
let
time2
=
date1
.
getFullYear
()
+
"-"
+
(
date1
.
getMonth
()
+
1
)
this
.
date
=
time1
this
.
date2
=
time2
this
.
msg
.
CreateDate
=
time2
this
.
balancedata
()
this
.
getlogs
()
},
...
...
@@ -147,31 +163,36 @@
getlogs
(){
this
.
load
=
true
uni
.
showNavigationBarLoading
();
let
h
=
this
.
apiheader
()
this
.
request
(
uni
.
showLoading
({
title
:
'加载中'
});
this
.
request2
(
{
url
:
""
,
header
:
h
,
data
:
{
r
:
"api/balance/logs"
,
date
:
this
.
date2
,
}
url
:
'/api/AppletUser/GetMemberBalancePageList'
,
data
:
this
.
msg
},
res
=>
{
this
.
load
=
false
this
.
logsList
=
res
.
data
.
list
uni
.
hideNavigationBarLoading
()
uni
.
hideLoading
();
if
(
res
.
resultCode
==
1
){
this
.
logsList
=
this
.
logsList
.
concat
(
res
.
data
.
pageData
);
this
.
page_count
=
res
.
data
.
pageCount
;
if
(
this
.
page_count
==
1
)
{
this
.
status
=
"nomore"
;
}
}
}
);
},
fun_date
(
num
){
let
date
=
this
.
date
;
let
date2
=
this
.
date2
;
let
date2
=
this
.
msg
.
CreateDate
;
let
currentDate
=
new
Date
(
date2
);
this
.
msg
.
pageIndex
=
1
;
this
.
logsList
=
[];
if
(
num
==-
1
){
let
lastDate
=
currentDate
.
setMonth
(
currentDate
.
getMonth
()
-
1
);
// 输出日期格式为毫秒形式1551398400000
...
...
@@ -183,7 +204,7 @@
lastDate
=
lastYear
+
'年'
+
lastMonth
+
'月'
;
let
lastDate2
=
lastYear
+
'-'
+
lastMonth
;
this
.
date
=
lastDate
;
this
.
date2
=
lastDate2
;
this
.
msg
.
CreateDate
=
lastDate2
;
this
.
getlogs
()
}
else
if
(
num
==
1
){
...
...
@@ -196,7 +217,7 @@
nextDate
=
nextYear
+
'年'
+
nextMonth
+
'月'
;
let
nextDate2
=
nextYear
+
'-'
+
nextMonth
;
this
.
date
=
nextDate
;
this
.
date2
=
nextDate2
;
this
.
msg
.
CreateDate
=
nextDate2
;
this
.
getlogs
()
}
...
...
@@ -213,11 +234,20 @@
url
:
url
})
},
godetail
(
i
d
){
godetail
(
i
tem
){
uni
.
navigateTo
({
url
:
'/pages/balance/detail?i
d='
+
id
url
:
'/pages/balance/detail?i
tem='
+
encodeURIComponent
(
JSON
.
stringify
(
item
))
})
}
},
lower
(
e
)
{
if
(
this
.
msg
.
pageIndex
<
this
.
page_count
)
{
this
.
msg
.
pageIndex
++
;
this
.
status
=
"loading"
;
this
.
getlogs
();
}
else
{
this
.
status
=
"nomore"
;
}
},
}
}
</
script
>
...
...
pages/balance/detail.vue
View file @
123de04a
...
...
@@ -5,24 +5,31 @@
<Text>
交易金额
</Text>
</view>
<Text
class=
'bd_r'
:style=
"
{color:g.
type==1 ? mainColor:'#6ABE60',}">
{{
g
.
type
==
1
?
'+'
:
'-'
}}{{
g
.
money
}}
</Text>
<Text
class=
'bd_r'
:style=
"
{color:g.
Type==1 ? mainColor:'#6ABE60',}">
{{
g
.
Type
==
1
?
'+'
:
'-'
}}{{
g
.
Balance
}}
</Text>
</view>
<view
class=
"bd_box"
>
<view
class=
'bd_box_l'
>
<Text>
交易时间
</Text>
</view>
<Text
>
{{
g
.
created_at
}}
</Text>
<Text
>
{{
g
.
CreateDate
}}
</Text>
</view>
<view
class=
"bd_box"
style=
"align-items: flex-start;"
>
<view
class=
'bd_box_l'
>
<Text>
交易详情
</Text>
</view>
<view
style=
'width: calc(100vw - 20px - 80px);'
>
<Text
>
{{
g
.
desc
}}
</Text>
<Text
>
{{
g
.
Description
}}
</Text>
</view>
</view>
<view
class=
"bd_box"
>
<view
class=
'bd_box_l'
>
<Text>
备注
</Text>
</view>
<Text
>
{{
g
.
Remarks
}}
</Text>
</view>
</view>
</
template
>
...
...
@@ -54,7 +61,11 @@
},
onLoad
(
option
){
this
.
getlogdetail
(
option
.
id
)
if
(
option
.
item
)
{
this
.
g
=
JSON
.
parse
(
decodeURIComponent
(
option
.
item
));
}
},
created
(){
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
-
40
)
+
'px'
;
...
...
@@ -65,24 +76,7 @@
methods
:
{
getlogdetail
(
id
){
uni
.
showNavigationBarLoading
();
let
h
=
this
.
apiheader
()
this
.
request
(
{
url
:
""
,
header
:
h
,
data
:
{
r
:
"api/balance/log-detail"
,
id
:
id
}
},
res
=>
{
uni
.
hideNavigationBarLoading
()
this
.
g
=
res
.
data
.
detail
;
}
);
},
}
...
...
pages/member/index/index.vue
0 → 100644
View file @
123de04a
<
template
>
<view
class=
"memberStyle"
:style=
"
{'height':contentHeight}">
<view
class=
'memberTop'
>
<view
class=
"memberT_box"
>
<view
style=
'display: flex;flex-direction: row;align-items: center;margin-top: 10px;'
>
<u-avatar
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/user_default.jpg"
size=
"100"
></u-avatar>
<view
style=
'margin-left: 30px;display: flex;flex-direction: column;justify-content: space-around;height: 50px;color: #fff;'
>
<Text>
哈哈
</Text>
<view
class=
"member"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/user_cardmember-0.png"
mode=
'aspectFill'
style=
"width: 24px;height: 24px;border-radius: 12px;"
></image>
<Text
style=
'margin-right: 10px;'
>
普通用户
</Text>
</view>
</view>
</view>
<view
class=
'balance'
>
<view
class=
'balance_l'
>
<Text
style=
'font-size: 10px;'
>
账号余额
</Text>
<Text
style=
'font-size: 22px;'
>
¥0.5
</Text>
</view>
<view
class=
'balance_r'
@
click=
"gobalance()"
>
<Text>
去充值
</Text>
</view>
</view>
<view
style=
"width: 100%;height: 200px;border-radius: 10px;overflow: hidden;margin-top: 10px;"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/user_cardmember-0.png"
mode=
'aspectFill'
style=
"width: 100%;height: 100%;"
></image>
</view>
<image
src=
"../../../static/images/icon/card-bottom.png"
mode=
'widthFix'
style=
"width: 100%;position: absolute;left: 0;bottom: 0;"
></image>
</view>
</view>
<view
class=
"memberC"
>
<image
src=
"../../../static/images/icon/banner.png"
mode=
'widthFix'
style=
"width: 100%;margin-top: 5px;"
></image>
<view
class=
"mc_box"
@
click=
"goUrl()"
>
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
contentHeight
:
0
,
mainColor
:
''
,
}
},
created
(){
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
-
40
)
+
'px'
;
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
uni
.
setNavigationBarTitle
({
title
:
'会员中心'
,
});
},
methods
:
{
goUrl
(){
uni
.
navigateTo
({
url
:
'/pages/member/privilege'
});
},
gobalance
(){
uni
.
navigateTo
({
url
:
'/pages/balance/recharge'
});
}
}
}
</
script
>
<
style
>
.memberStyle
{
background
:
#fff
;
}
.memberStyle
.memberTop
{
width
:
100%
;
height
:
350px
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
background
:
#292A30
;
position
:
relative
;
overflow
:
hidden
;
}
.memberStyle
.memberTop
.memberT_box
{
width
:
90%
;
display
:
flex
;
flex-direction
:
column
;
}
.memberStyle
.memberTop
.member
{
background
:
#3B3641
;
width
:
80px
;
font-size
:
10px
;
color
:
#fff
;
height
:
18px
;
border-radius
:
9px
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
}
.memberStyle
.balance
{
width
:
100%
;
height
:
80px
;
background
:
#464954
;
border-radius
:
10px
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
padding
:
0
15px
;
margin-top
:
10px
;
}
.memberStyle
.balance_l
{
display
:
flex
;
flex-direction
:
column
;
color
:
#fff
;
}
.memberStyle
.balance_r
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
width
:
80px
;
height
:
30px
;
border-radius
:
15px
;
border
:
1px
solid
#fff
;
color
:
#fff
;
}
.memberStyle
.memberC
{
width
:
100%
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
}
.mc_box
{
width
:
94%
;
height
:
100px
;
border-radius
:
10px
;
border
:
1px
solid
#D6C8AB
;
margin-top
:
10px
;
}
</
style
>
pages/member/privilege.vue
0 → 100644
View file @
123de04a
<
template
>
<view
class=
"privilegeStyle"
:style=
"
{'height':contentHeight}">
<view
class=
"privilege_t"
>
<image
src=
"../../static/images/icon/privilegebg.jpeg"
mode=
'aspectFit'
style=
"width: 100%;height: 250px;"
></image>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
contentHeight
:
0
,
mainColor
:
''
,
}
},
created
(){
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
-
40
)
+
'px'
;
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
uni
.
setNavigationBarTitle
({
title
:
'会员特权说明'
,
});
},
methods
:
{
}
}
</
script
>
<
style
>
.privilegeStyle
{
background
:
#fff
;
}
.privilegeStyle
.privilege_t
{
width
:
100%
;
height
:
250px
;
}
</
style
>
pages/user-center/user-center.vue
View file @
123de04a
<
template
>
<view
class=
"userStyle"
>
<view
class=
"userBox"
:style=
"
{ 'margin-bottom': bottommargin }">
<view
:style=
"
{ 'background-image': 'url(' +
meueData.user_center.top_pic_url
+ ')', backgroundSize: '100% 330rpx' }" class="imgbg">
<view
:style=
"
{ 'background-image': 'url(' +
(meueData.user_center.top_pic_url?meueData.user_center.top_pic_url:'')
+ ')', backgroundSize: '100% 330rpx' }" class="imgbg">
<view
style=
"display: flex;flex-direction: row;align-items: center;width: 100%;"
v-if=
"meueData.user_center.top_style == 1"
>
<u-avatar
:src=
"user_info.avatar"
size=
"140"
style=
"margin-left: 50rpx;"
></u-avatar>
<Text
style=
"color: #FFF;margin-left: 20rpx;font-size: 36rpx;"
@
click=
"login(user_info)"
>
{{
user_info
.
nickname
?
user_info
.
nickname
:
'立即登录'
}}
</Text>
<view
style=
"display: flex;flex-direction: column;justify-content: center;"
>
<Text
style=
"color: #FFF;margin-left: 20rpx;font-size: 36rpx;"
@
click=
"login(user_info)"
>
{{
user_info
.
nickname
?
user_info
.
nickname
:
'立即登录'
}}
</Text>
<view
class=
"member"
@
click=
"goUrl('/pages/member/index/index')"
>
<image
:src=
"meueData.user_center.top_pic_url"
mode=
'aspectFill'
style=
"width: 26px;height: 26px;border-radius: 13px;"
></image>
<Text
style=
'margin-right: 10px;'
>
{{
user_info
.
identity
.
level_name
!=
null
?
user_info
.
identity
.
level_name
:
'普通用户'
}}
</Text>
</view>
</view>
</view>
<view
style=
"display: flex;flex-direction: column;align-items: center;"
v-if=
"meueData.user_center.top_style == 2"
>
<u-avatar
:src=
"user_info.avatar"
size=
"140"
></u-avatar>
<Text
style=
"color: #FFF;margin-left: 20rpx;font-size: 36rpx;"
@
click=
"login(user_info)"
>
{{
user_info
.
nickname
?
user_info
.
nickname
:
'立即登录'
}}
</Text>
<view
class=
"member"
@
click=
"goUrl('/pages/member/index/index')"
>
<image
:src=
"meueData.user_center.top_pic_url"
mode=
'aspectFill'
style=
"width: 26px;height: 26px;border-radius: 13px;"
></image>
<Text
style=
'margin-right: 10px;'
>
{{
user_info
.
identity
.
level_name
!=
null
?
user_info
.
identity
.
level_name
:
'普通用户'
}}
</Text>
</view>
</view>
<view
class=
"ReceiptAdder"
@
click=
"goUrl('/pages/address/address')"
:style=
"
{ background: mainColor }">
<u-icon
name=
"location"
color=
"#fff"
size=
"40"
></u-icon>
...
...
@@ -370,4 +381,16 @@ console.log(wx.getStorageSync('basedata'))
align-items
:
center
;
padding
:
0
20
rpx
;
}
.userStyle
.member
{
background
:
#3B3641
;
width
:
80px
;
font-size
:
10px
;
color
:
#fff
;
height
:
18px
;
border-radius
:
9px
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
}
</
style
>
static/images/icon/banner.png
0 → 100644
View file @
123de04a
9.27 KB
static/images/icon/card-bottom.png
0 → 100644
View file @
123de04a
3.34 KB
static/images/icon/privilegebg.jpeg
0 → 100644
View file @
123de04a
33.1 KB
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