Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_wechat
Overview
Overview
Details
Activity
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
pseer
gxpt_wechat
Commits
9c82c1fc
Commit
9c82c1fc
authored
Sep 19, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
功能优化
parent
9ece05eb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
546 additions
and
45 deletions
+546
-45
recharge.js
api/recharge.js
+7
-0
pages.json
pages.json
+9
-1
myInfo.vue
pages/my/myInfo.vue
+17
-0
index.vue
setting/equityFundLog/index.vue
+267
-44
list.vue
setting/equityFundLog/list.vue
+246
-0
No files found.
api/recharge.js
View file @
9c82c1fc
...
...
@@ -38,3 +38,9 @@ export const equityFundLog=(data)=>{
let
url
=
`/equityFundLog/list`
return
http
.
get
(
url
,
data
)
}
export
const
equityBindUser
=
(
data
)
=>
{
let
url
=
`/activities/list`
return
http
.
get
(
url
,
data
)
}
\ No newline at end of file
pages.json
View file @
9c82c1fc
...
...
@@ -253,7 +253,15 @@
{
"path"
:
"equityFundLog/index"
,
"style"
:
{
"navigationBarTitleText"
:
"收益明细"
,
"navigationBarTitleText"
:
"权益金详情"
,
"navigationStyle"
:
"custom"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"equityFundLog/list"
,
"style"
:
{
"navigationBarTitleText"
:
"绑定用户"
,
"enablePullDownRefresh"
:
false
}
}
...
...
pages/my/myInfo.vue
View file @
9c82c1fc
...
...
@@ -185,6 +185,18 @@
<text
class=
"text-black text-lg text-bold"
>
{{
userInfo
.
number
||
0
}}
</text>
</view>
</view>
<view
class=
"item-box"
@
tap=
"onNavByPath('equityFundLog')"
>
<view
class=
"icon-img"
>
<image
:class=
"userInfo.consumerMember && userInfo.consumerMember.isRights?'':'filter-box'"
:src=
"assetsPath+'/user/wallet_icon_1.png'"
mode=
"scaleToFill"
></image>
</view>
<view
class=
"text-box"
>
<text
class=
"text-gray"
>
权益金
</text>
</view>
<view
class=
"value-box"
>
<text
class=
"text-black text-lg text-bold"
>
{{
userInfo
.
consumerWallet
.
equityFund
||
0
}}
</text>
</view>
</view>
</view>
</view>
...
...
@@ -754,6 +766,7 @@
})
},
onNavByPath
(
pathName
){
if
(
pathName
===
'equityFundLog'
&&
!
(
this
.
userInfo
.
consumerMember
&&
this
.
userInfo
.
consumerMember
.
isRights
))
return
;
if
([
"levelDetail"
].
includes
(
pathName
)
&&
!
this
.
loginStatus
){
console
.
log
(
pathName
,
999999
)
this
.
$refs
.
loginPop
.
open
();
...
...
@@ -1709,4 +1722,7 @@
}
}
}
.filter-box
{
filter
:
grayscale
(
100%
);
}
</
style
>
\ No newline at end of file
setting/equityFundLog/index.vue
View file @
9c82c1fc
<
template
>
<view
class=
"order-record"
>
<view
class=
"content-box"
>
<view
class=
"list-content"
>
<view
v-for=
"(item,index) in list"
:key=
"index"
class=
"list-item"
@
tap=
"onNavToOrderInfo(item)"
>
<f-navbar
title=
"奖励金"
:isShowTransparentTitle=
"false"
:isShowLeft=
"true"
fontColor=
"#ffffff"
:fontSize=
"38"
bgColor=
"#E40583"
:scrollTop=
"scrollTop"
navbarType=
'5'
></f-navbar>
<scroll-view
:enable-flex=
"true"
class=
"scroll-view"
scroll-y=
"true"
@
scroll=
"onScroll"
@
scrolltolower=
"onScrolltolower"
>
<view
class=
"content-box"
>
<view
class=
"header-content"
:style=
"
{paddingTop:statusBarHeight+'px' }">
<!--
<image
class=
"logo-bg"
:src=
"assetsPath +'/logo_v1.png'"
mode=
"widthFix"
></image>
-->
<view
class=
"flex-col avatar-box"
>
<view
class=
"avatar"
>
<image
:src=
"userInfo.avatar || assetsPath+'/logo_icon.png' "
mode=
"scaleToFill"
></image>
</view>
<view
class=
""
>
<text
class=
"text-white text-lg"
>
{{
userInfo
.
nickName
||
'凑角_'
+
userName
}}
</text>
</view>
<view
class=
"amount"
>
<text
class=
"text-bold text-white"
>
{{
userInfo
&&
userInfo
.
consumerWallet
&&
userInfo
.
consumerWallet
.
equityFund
?
(
userInfo
.
consumerWallet
.
equityFund
).
toFixed
(
2
)
:
'0.00'
}}
</text>
</view>
</view>
<view
class=
"flex-between part-list"
>
<view
class=
"flex-col"
>
<text
class=
"text-white text-sm"
>
累计收益
</text>
<text
class=
"text-bold text-white text-xl"
>
{{
userInfo
&&
userInfo
.
consumerWallet
&&
userInfo
.
consumerWallet
.
accumulateEquityFund
?
(
userInfo
.
consumerWallet
.
accumulateEquityFund
).
toFixed
(
2
)
:
'0.00'
}}
</text>
</view>
<view
class=
"flex-col"
>
<text
class=
"text-white text-sm"
>
绑定用户
</text>
<view
class=
"flex-row-center"
@
tap=
"onNavToUsers"
>
<text
class=
"text-bold text-white text-xl"
>
{{
countNum
}}
</text>
<text
class=
"cuIcon-right text-white text-xl"
></text>
</view>
</view>
</view>
<view
class=
"flex-between"
>
<text
class=
""
>
获益金额
</text>
<text
class=
"text-pink text-bold text-lg"
>
¥
{{
item
.
equityFund
}}
</text>
<view
class=
"btn-box"
>
<button
class=
"cu-btn round bg-white"
@
tap=
"onConfirm"
>
立即提现
</button>
</view>
<view
class=
"flex-between"
>
<text
class=
""
>
获益方式
</text>
<text
class=
"text-black"
>
{{
equityFundTypeEnum
[
item
.
equityFundType
]
}}
</text>
</view>
<view
class=
"content-list"
>
<view
v-if=
"list && list.length"
class=
"padding-sm"
>
<text
class=
"text-title text-lg text-black"
>
权益金入账信息
</text>
</view>
<view
class=
"list-content"
>
<view
v-for=
"(item,index) in list"
:key=
"index"
class=
"list-item"
@
tap=
"onNavToOrderInfo(item)"
>
<view
class=
"flex-between"
>
<view
class=
"flex-row-center"
>
<text
class=
""
>
入账时间:
</text>
<text
class=
"margin-left"
>
{{
item
.
createTime
}}
</text>
</view>
<view
class=
""
>
</view>
</view>
<view
class=
"flex-between"
>
<text
class=
""
>
金额:
</text>
<text
class=
"text-pink text-bold text-lg"
>
¥
{{
item
.
equityFund
}}
</text>
</view>
<view
class=
"flex-between"
>
<text
class=
""
>
说明:
</text>
<text
class=
"text-black"
>
好友
<text
class=
"text-bold"
>
{{
item
.
newNickName
||
'凑角用户'
}}
_
{{
item
.
phone4Last
}}
</text>
进行
<text
class=
"text-bold"
>
{{
equityFundTypeEnum
[
item
.
equityFundType
]
}}
</text>
后返现
</text>
</view>
</view>
</view>
<view
class=
"flex-between"
>
<text
class=
""
>
创建时间
</text>
<text>
{{
item
.
createTime
}}
</text>
<view
v-if=
"list.length == 0"
class=
"empty-box"
>
<u-empty
text=
"暂无数据"
textColor=
'#C1C1C1'
width=
"120"
:icon=
"listBlankImage"
>
</u-empty>
</view>
<view
v-if=
"list.length"
style=
"padding: 12px 6% 0;"
>
<u-loadmore
:status=
"status"
:icon=
"true"
:line=
'true'
:loading-text=
"loadingText"
:loadmore-text=
"loadmoreText"
:nomore-text=
"nomoreText"
/>
</view>
</view>
</view>
</view>
<view
v-if=
"list.length == 0"
class=
"empty-box"
>
<u-empty
text=
"暂无数据"
textColor=
'#C1C1C1'
width=
"120"
:icon=
"listBlankImage"
>
</u-empty>
</view>
<view
v-if=
"list.length"
style=
"padding: 12px 6% 0;"
>
<u-loadmore
:status=
"status"
:icon=
"true"
:line=
'true'
:loading-text=
"loadingText"
:loadmore-text=
"loadmoreText"
:nomore-text=
"nomoreText"
/>
</view>
</scroll-view>
</view>
</
template
>
<
script
>
import
fNavbar
from
'@/components/module/f-navbar/f-navbar'
;
import
config
from
"@/config/index.config"
import
{
equityFundLog
getUserInfo
}
from
"@/api/index.js"
import
{
equityFundLog
,
equityBindUser
}
from
"@/api/recharge.js"
import
NoLogin
from
"@/components/noLogin/noLogin"
import
{
...
...
@@ -44,22 +105,25 @@
export
default
{
components
:
{
NoLogin
NoLogin
,
fNavbar
},
data
()
{
return
{
statusBarHeight
:
this
.
statusBarHeight
,
status
:
'nomore '
,
loadingText
:
'努力加载中'
,
loadmoreText
:
'上划加载'
,
nomoreText
:
'到底啦'
,
statusIndex
:
0
,
list
:
[],
assetsPath
:
config
.
assetsPath
,
scrollTop
:
0
,
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
pageSize
:
5
},
equityFundTypeEnum
:{
equityFundTypeEnum
:
{
0
:
"金额充值"
,
1
:
"权益购买"
},
...
...
@@ -73,22 +137,53 @@
expenditure
:
'-'
,
income
:
'+'
},
userInfo
:
uni
.
getStorageSync
(
'userInfo'
),
listBlankImage
:
config
.
assetsPath
+
'/no_data_icon.png'
,
countNum
:
0
,
userName
:
''
};
},
onLoad
()
{
},
onReachBottom
()
{
if
(
this
.
status
==
'loadmore'
)
{
this
.
queryParams
.
pageNum
+=
1
;
this
.
onLoading
();
}
this
.
onGetUserInfo
()
},
onShow
()
{
this
.
onGetDicts
()
this
.
onEquityBindUser
()
},
methods
:
{
onScrolltolower
(){
if
(
this
.
status
==
'loadmore'
)
{
this
.
queryParams
.
pageNum
+=
1
;
this
.
onLoading
();
}
},
onConfirm
(){
uni
.
showToast
({
icon
:
"none"
,
title
:
"功能暂未开放,敬请期待!"
})
},
onGetUserInfo
()
{
getUserInfo
().
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
this
.
userInfo
=
{
...
res
.
data
.
data
,
consumerWallet
:
res
.
data
.
data
.
consumerWallet
?
res
.
data
.
data
.
consumerWallet
:
{
remainingIntegral
:
0
}
}
if
(
this
.
userInfo
&&
this
.
userInfo
.
phone
){
this
.
userName
=
this
.
userInfo
.
phone
.
slice
(
-
4
);
}
uni
.
setStorageSync
(
'userInfo'
,
this
.
userInfo
)
this
.
$forceUpdate
();
}
})
},
onScroll
(
e
)
{
this
.
scrollTop
=
e
.
target
.
scrollTop
;
console
.
log
(
this
.
scrollTop
,
99999
)
},
onGetDicts
()
{
let
dicts
=
[]
if
(
uni
.
getStorageSync
(
'dicts'
))
{
...
...
@@ -112,31 +207,38 @@
equityFundLog
(
this
.
queryParams
).
then
(
res
=>
{
console
.
log
(
res
)
uni
.
hideLoading
()
if
(
res
.
data
.
code
==
200
)
{
let
list
=
res
.
data
.
rows
.
map
(
item
=>
{
return
{
...
item
...
item
,
phone4Last
:
item
.
newAccount
.
slice
(
-
4
)
}
})
if
(
this
.
queryParams
.
pageNum
===
1
)
{
if
(
this
.
queryParams
.
pageNum
===
1
)
{
this
.
list
=
list
}
else
{
}
else
{
this
.
list
.
push
(...
list
);
}
if
(
this
.
list
.
length
<
res
.
data
.
total
)
{
if
(
this
.
list
.
length
<
res
.
data
.
total
)
{
this
.
status
=
"loadmore"
}
else
{
}
else
{
this
.
status
=
"nomore"
}
}
else
if
(
res
.
data
.
code
==
401
)
{
this
.
loginStatus
=
false
}
})
},
onEquityBindUser
()
{
equityBindUser
().
then
(
res
=>
{
console
.
log
(
res
,
999999
)
this
.
countNum
=
res
.
data
.
total
})
},
tabSelect
(
i
)
{
console
.
log
(
i
,
99999
)
this
.
statusIndex
=
i
;
...
...
@@ -148,6 +250,11 @@
// uni.navigateTo({
// url:"/pages/orderResult/orderResult?orderNo="+val.orderNo
// })
},
onNavToUsers
(){
uni
.
navigateTo
({
url
:
"/setting/equityFundLog/list"
})
}
}
}
...
...
@@ -155,16 +262,101 @@
<
style
>
page
{
background-color
:
#f1f1f1
;
height
:
100vh
;
width
:
100vw
;
}
</
style
>
<
style
lang=
"scss"
scoped
>
.order-record
{
display
:
flex
;
flex-direction
:
column
;
width
:
100%
;
height
:
100%
;
.content-box
{
.scroll-view
{
position
:
relative
;
display
:
flex
;
flex
:
1
;
width
:
100vw
;
.content-box
{
position
:
absolute
;
left
:
0
;
width
:
100%
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
//
background
:
#f5f5f5
;
//
padding-bottom
:
50px
;
}
}
.header-content
{
position
:
relative
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
width
:
100%
;
min-height
:
400
upx
;
background
:
linear-gradient
(
to
right
,
#FB406F
,
#E40583
);
.logo-bg
{
width
:
380
upx
;
max-height
:
280
upx
;
}
.avatar-box
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
.avatar{
border
:
2px
solid
rgba
(
255
,
255
,
255
,
0.8
);
width
:
52px
;
height
:
52px
;
border-radius
:
50%
;
overflow
:
hidden
;
box-shadow
:
0
0
6
upx
#f1f1f1
;
image{
display
:
block
;
width
:
100%
;
height
:
100%
;
}
}
.amount
{
margin-top
:
16
upx
;
text{
font-size
:
60
upx
;
}
}
}
.part-list
{
width
:
100%
;
padding
:
0
24
upx
12
upx
;
.flex-col{
justify-content
:
center
;
align-items
:
center
;
}
}
.btn-box
{
position
:
absolute
;
left
:
0
;
bottom
:
-16px
;
width
:
100%
;
display
:
flex
;
justify-content
:
center
;
.cu-btn{
box-shadow
:
0
4
upx
4
upx
#E40583
;
}
}
}
.content-list
{
display
:
flex
;
flex
:
1
;
width
:
100%
;
flex-direction
:
column
;
margin
:
20
upx
0
0
0
;
.list-content
{
display
:
flex
;
...
...
@@ -174,12 +366,16 @@
.list-item
{
display
:
flex
;
flex-direction
:
column
;
width
:
9
4
%
;
width
:
9
6
%
;
padding
:
20
upx
20
upx
;
border-radius
:
20
upx
;
background-color
:
#ffffff
;
margin-top
:
30
upx
;
>.flex-between
{
padding
:
6
upx
0
;
}
.part-1
{
display
:
flex
;
...
...
@@ -189,7 +385,33 @@
}
}
}
.list-item
:first-child
{
margin-top
:
0
;
}
}
}
}
.count-part
{
background-color
:
#ffffff
;
.flex-1
{
padding
:
20
upx
0
;
.margin-top-sm
{
margin-top
:
10
upx
;
}
}
.flex-row-center
{
justify-content
:
center
;
}
}
.line
{
height
:
80%
;
width
:
0
;
border-left
:
2
upx
solid
#e5e5e5
;
}
</
style
>
\ No newline at end of file
setting/equityFundLog/list.vue
0 → 100644
View file @
9c82c1fc
<
template
>
<view
class=
"order-record"
>
<view
class=
"content-box"
>
<view
class=
"content-list"
>
<view
class=
"list-content"
>
<view
v-for=
"(item,index) in list"
:key=
"index"
class=
"list-item"
>
<view
class=
"avatar-box"
>
<view
class=
"avatar"
>
<image
:src=
"item.newAvatar || assetsPath+'/logo_icon.png' "
mode=
"scaleToFill"
></image>
</view>
<view
class=
""
>
<text
class=
"text-title text-black text-lg"
>
{{
item
.
newNickName
||
'凑角用户'
}}
_
{{
item
.
userName
}}
</text>
</view>
</view>
<text
class=
"margin-left"
>
{{
item
.
createTime
||
item
.
updateTime
}}
</text>
</view>
</view>
<view
v-if=
"list.length == 0"
class=
"empty-box"
>
<u-empty
text=
"暂无数据"
textColor=
'#C1C1C1'
width=
"120"
:icon=
"listBlankImage"
>
</u-empty>
</view>
<view
v-if=
"list.length"
style=
"padding: 12px 6% 0;"
>
<u-loadmore
:status=
"status"
:icon=
"true"
:line=
'true'
:loading-text=
"loadingText"
:loadmore-text=
"loadmoreText"
:nomore-text=
"nomoreText"
/>
</view>
</view>
</view>
</view>
</
template
>
<
script
>
import
config
from
"@/config/index.config"
import
{
equityBindUser
}
from
"@/api/recharge.js"
import
{
getDictItem
}
from
"@/utils/tools.js"
export
default
{
data
()
{
return
{
statusBarHeight
:
this
.
statusBarHeight
,
status
:
'nomore '
,
loadingText
:
'努力加载中'
,
loadmoreText
:
'上划加载'
,
nomoreText
:
'到底啦'
,
statusIndex
:
0
,
list
:
[],
assetsPath
:
config
.
assetsPath
,
scrollTop
:
0
,
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
},
equityFundTypeEnum
:
{
0
:
"金额充值"
,
1
:
"权益购买"
},
orderStatusEnum
:
{},
payTypeEnum
:
{
1
:
"微信支付"
,
2
:
"支付宝支付"
,
3
:
"余额支付"
},
payStatus
:
{
expenditure
:
'-'
,
income
:
'+'
},
listBlankImage
:
config
.
assetsPath
+
'/no_data_icon.png'
,
};
},
onLoad
()
{
this
.
onGetDicts
()
},
onReachBottom
()
{
if
(
this
.
status
==
'loadmore'
)
{
this
.
queryParams
.
pageNum
+=
1
;
this
.
onLoading
();
}
},
methods
:
{
onGetDicts
()
{
let
dicts
=
[]
if
(
uni
.
getStorageSync
(
'dicts'
))
{
dicts
=
JSON
.
parse
(
uni
.
getStorageSync
(
'dicts'
))
this
.
orderStatusEnum
=
getDictItem
(
dicts
,
"store_order_status"
);
this
.
onLoading
()
}
else
{
dictList
().
then
(
res
=>
{
dicts
=
res
.
data
.
data
;
uni
.
setStorageSync
(
'dicts'
,
JSON
.
stringify
(
res
.
data
.
data
))
this
.
orderStatusEnum
=
getDictItem
(
dicts
,
"store_order_status"
);
this
.
onLoading
()
})
}
},
onLoading
()
{
uni
.
showLoading
({
title
:
'加载中'
})
this
.
status
=
'loading'
equityBindUser
(
this
.
queryParams
).
then
(
res
=>
{
console
.
log
(
res
)
uni
.
hideLoading
()
if
(
res
.
data
.
code
==
200
)
{
let
list
=
res
.
data
.
rows
.
map
(
item
=>
{
return
{
...
item
,
userName
:
item
.
newPhone
?
item
.
newPhone
.
slice
(
-
4
):
'0000'
}
})
if
(
this
.
queryParams
.
pageNum
===
1
)
{
this
.
list
=
list
}
else
{
this
.
list
.
push
(...
list
);
}
if
(
this
.
list
.
length
<
res
.
data
.
total
)
{
this
.
status
=
"loadmore"
}
else
{
this
.
status
=
"nomore"
}
}
else
if
(
res
.
data
.
code
==
401
)
{
this
.
loginStatus
=
false
}
})
}
}
}
</
script
>
<
style
>
page
{
background-color
:
#f1f1f1
;
height
:
100vh
;
width
:
100vw
;
}
</
style
>
<
style
lang=
"scss"
scoped
>
.order-record
{
display
:
flex
;
flex-direction
:
column
;
width
:
100%
;
height
:
100%
;
.content-list
{
display
:
flex
;
flex
:
1
;
width
:
100%
;
flex-direction
:
column
;
margin
:
20
upx
0
0
0
;
.list-content
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
.list-item
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
width
:
96%
;
padding
:
20
upx
20
upx
;
border-radius
:
20
upx
;
background-color
:
#ffffff
;
margin-top
:
30
upx
;
>.flex-between
{
padding
:
6
upx
0
;
}
.part-1
{
display
:
flex
;
.flex-row
{
display
:
flex
;
flex-direction
:
row
;
}
}
}
.list-item
:first-child
{
margin-top
:
0
;
}
}
}
}
.count-part
{
background-color
:
#ffffff
;
.flex-1
{
padding
:
20
upx
0
;
.margin-top-sm
{
margin-top
:
10
upx
;
}
}
.flex-row-center
{
justify-content
:
center
;
}
}
.avatar-box
{
display
:
flex
;
flex-direction
:
row
;
justify-content
:
center
;
align-items
:
center
;
.avatar{
border
:
2px
solid
rgba
(
255
,
255
,
255
,
0.8
);
width
:
42px
;
height
:
42px
;
border-radius
:
50%
;
overflow
:
hidden
;
box-shadow
:
0
0
6
upx
#ff007f
;
margin-right
:
8
upx
;
image{
display
:
block
;
width
:
100%
;
height
:
100%
;
}
}
.amount
{
margin-top
:
16
upx
;
text{
font-size
:
60
upx
;
}
}
}
</
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