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
d5409100
Commit
d5409100
authored
Nov 07, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面内容新增
parent
231f4926
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
285 additions
and
17 deletions
+285
-17
recharge.js
api/recharge.js
+18
-0
pages.json
pages.json
+7
-0
myInfo.vue
pages/my/myInfo.vue
+4
-2
index.vue
setting/cardPackageRecord/index.vue
+22
-1
record.vue
setting/cardPackageRecord/record.vue
+215
-0
index.vue
setting/publicize/index.vue
+19
-14
No files found.
api/recharge.js
View file @
d5409100
...
...
@@ -84,3 +84,21 @@ export const createSecondaryCardOrder=(data)=>{
let
url
=
`/secondaryCardOrder/createSecondaryCardOrder`
return
http
.
post
(
url
,
data
)
}
export
const
monthlyCardRecord
=
(
data
)
=>
{
let
url
=
`/monthlyCardOrder/list`
return
http
.
get
(
url
,
data
)
}
export
const
secondaryCardRecord
=
(
data
)
=>
{
let
url
=
`/secondaryCardOrder/list`
return
http
.
get
(
url
,
data
)
}
export
const
getShareList
=
(
data
)
=>
{
let
url
=
`/durationLog/shareList`
return
http
.
get
(
url
,
data
)
}
pages.json
View file @
d5409100
...
...
@@ -286,6 +286,13 @@
}
},
{
"path"
:
"cardPackageRecord/record"
,
"style"
:
{
"navigationBarTitleText"
:
"卡包-购买记录"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"publicize/index"
,
"style"
:
{
...
...
pages/my/myInfo.vue
View file @
d5409100
...
...
@@ -134,7 +134,7 @@
<view
v-if=
"monthlyCard.status"
class=
"flex-row-center"
>
<text
class=
"text-1"
>
月卡
</text>
<view
class=
"flex-row"
>
<text
v-if=
"monthlyCard.status==1"
class=
"text-3"
>
今日
待使用
</text>
<text
v-if=
"monthlyCard.status==1"
class=
"text-3"
>
今日
剩
{{
monthlyCard
.
num
}}
小时
</text>
<text
v-else-if=
"monthlyCard.status==2"
class=
"text-3"
>
明日待使用
</text>
</view>
</view>
...
...
@@ -574,6 +574,7 @@ import moment from "../../common/moment";
loginStatus
:
uni
.
getStorageSync
(
'loginStatus'
)
==
'login'
?
true
:
false
,
monthlyCard
:{
status
:
0
,
num
:
0
},
secondaryCard
:{
status
:
0
,
...
...
@@ -670,6 +671,7 @@ import moment from "../../common/moment";
})
if
(
obj
){
this
.
monthlyCard
.
status
=
1
;
this
.
monthlyCard
.
num
=
obj
.
freeDuration
if
(
obj
.
freeDuration
<=
0
){
this
.
monthlyCard
.
status
=
2
;
}
...
...
@@ -1542,7 +1544,7 @@ import moment from "../../common/moment";
flex-direction
:
row
;
justify-content
:
center
;
align-items
:
center
;
width
:
10
2
rpx
;
width
:
10
6
rpx
;
height
:
32
rpx
;
background
:
#FFEED9
;
border-radius
:
4
rpx
;
...
...
setting/cardPackageRecord/index.vue
View file @
d5409100
<
template
>
<view
class=
"order-record"
>
<view
class=
"flex-between header-content"
>
<text
class=
"text-title text-black text-bold text-xl"
>
我的权益卡
</text>
<view
class=
"flex-row-center"
@
tap=
"onNavTo"
>
<text
class=
"text-title text-gray"
>
购买记录
</text>
<text
class=
"cuIcon-right text-gray"
></text>
</view>
</view>
<view
class=
"content-box"
>
<view
class=
"list-content"
>
<view
v-for=
"(item,index) in secondaryCardList"
:key=
"index"
class=
"relative list-item"
@
tap=
"onNavToOrderInfo(item)"
>
...
...
@@ -43,6 +52,9 @@
<u-empty
text=
"暂无数据"
textColor=
'#C1C1C1'
width=
"120"
:icon=
"listBlankImage"
>
</u-empty>
</view>
</view>
</
template
>
...
...
@@ -141,6 +153,11 @@
}
}
})
},
onNavTo
(){
uni
.
navigateTo
({
url
:
'/setting/cardPackageRecord/record'
})
}
}
}
...
...
@@ -154,7 +171,10 @@
.order-record
{
display
:
flex
;
flex-direction
:
column
;
.header-content{
padding
:
30
upx
30
upx
12
upx
;
align-items
:
center
;
}
.content-box
{
display
:
flex
;
flex-direction
:
column
;
...
...
@@ -184,6 +204,7 @@
margin
:
0
12
upx
;
image{
width
:
64%
;
max-height
:
104
upx
;
}
}
.text-2
{
...
...
setting/cardPackageRecord/record.vue
0 → 100644
View file @
d5409100
<
template
>
<view
class=
"order-record"
>
<view>
<u-tabs
:list=
"tabList"
@
change=
"onTabChange"
></u-tabs>
</view>
<view
v-if=
"loginStatus"
class=
"content-box"
>
<view
class=
"list-content"
>
<view
v-for=
"(item,index) in list"
:key=
"index"
class=
"list-item"
@
tap=
"onNavToOrderInfo(item)"
>
<view
class=
"flex-between"
>
<text
class=
""
>
支付金额
</text>
<text
class=
"text-bold text-pink text-lg"
>
¥
{{
item
.
secondaryCardAmount
||
item
.
monthlyCardAmount
}}
</text>
</view>
<view
class=
"flex-between"
>
<text
class=
""
>
支付方式
</text>
<text>
{{
payTypeEnum
[
item
.
payType
]
}}
</text>
</view>
<view
class=
"flex-between"
>
<text
class=
""
>
订单编号
</text>
<text
class=
"text-black"
>
{{
item
.
secondaryCardNo
||
item
.
monthlyCardNo
}}
</text>
</view>
<view
class=
"flex-between"
>
<text
class=
""
>
操作日期
</text>
<text>
{{
item
.
createTime
}}
</text>
</view>
</view>
</view>
</view>
<view
v-if=
"loginStatus && list.length == 0"
class=
"empty-box"
>
<u-empty
text=
"暂无数据"
textColor=
'#C1C1C1'
width=
"120"
:icon=
"listBlankImage"
>
</u-empty>
</view>
<view
v-if=
"loginStatus && 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>
<NoLogin
v-model=
"loginStatus"
/>
</view>
</
template
>
<
script
>
import
config
from
"@/config/index.config"
import
{
monthlyCardRecord
,
secondaryCardRecord
}
from
"@/api/recharge.js"
import
NoLogin
from
"@/components/noLogin/noLogin"
import
{
getDictItem
}
from
"@/utils/tools.js"
export
default
{
components
:
{
NoLogin
},
data
()
{
return
{
status
:
'nomore '
,
loadingText
:
'努力加载中'
,
loadmoreText
:
'上划加载'
,
nomoreText
:
'到底啦'
,
statusIndex
:
0
,
tabIndex
:
0
,
tabList
:[
{
name
:
"次卡"
,
value
:
secondaryCardRecord
,
},
{
name
:
"月卡"
,
value
:
monthlyCardRecord
,
}
],
list
:
[],
statusList
:
[{
label
:
"全部"
,
value
:
""
,
},
{
label
:
"已预约"
,
value
:
"0"
,
},
{
label
:
"使用中"
,
value
:
"1"
,
},
{
label
:
"已完成"
,
value
:
"2"
,
},
{
label
:
"退单"
,
value
:
"3"
,
}
],
queryParams
:
{
pageNum
:
1
,
pageSize
:
100
},
loginStatus
:
true
,
orderStatusEnum
:
{},
payTypeEnum
:
{
1
:
"微信支付"
,
2
:
"支付宝支付"
,
3
:
"余额支付"
},
payStatus
:
{
expenditure
:
'-'
,
income
:
'+'
},
listBlankImage
:
config
.
assetsPath
+
'/no_data_icon.png'
,
};
},
onLoad
()
{
},
onReachBottom
()
{
if
(
this
.
status
==
'loadmore'
)
{
this
.
queryParams
.
pageNum
+=
1
;
this
.
onLoading
();
}
},
onShow
()
{
this
.
onGetDicts
()
},
methods
:
{
onTabChange
(
val
){
this
.
tabIndex
=
val
.
index
;
this
.
queryParams
.
pageNum
=
1
;
this
.
onLoading
();
},
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'
this
.
queryParams
.
status
=
this
.
statusList
[
this
.
statusIndex
].
value
;
this
.
tabList
[
this
.
tabIndex
].
value
(
this
.
queryParams
).
then
(
res
=>
{
uni
.
hideLoading
()
this
.
status
=
"nomore"
if
(
res
.
data
.
code
==
200
)
{
this
.
list
=
res
.
data
.
rows
}
})
},
tabSelect
(
i
)
{
this
.
statusIndex
=
i
;
this
.
queryParams
.
pageNum
=
1
;
this
.
list
=
[]
this
.
onLoading
()
},
onNavToOrderInfo
(
val
)
{
// uni.navigateTo({
// url:"/pages/orderResult/orderResult?orderNo="+val.orderNo
// })
}
}
}
</
script
>
<
style
>
page
{
background-color
:
#f1f1f1
;
}
</
style
>
<
style
lang=
"scss"
scoped
>
.order-record
{
display
:
flex
;
flex-direction
:
column
;
.content-box
{
display
:
flex
;
flex-direction
:
column
;
.list-content
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
.list-item
{
display
:
flex
;
flex-direction
:
column
;
width
:
94%
;
padding
:
20
upx
20
upx
;
border-radius
:
20
upx
;
background-color
:
#ffffff
;
margin-top
:
30
upx
;
.part-1
{
display
:
flex
;
.flex-row
{
display
:
flex
;
flex-direction
:
row
;
}
}
}
}
}
}
</
style
>
\ No newline at end of file
setting/publicize/index.vue
View file @
d5409100
...
...
@@ -5,7 +5,7 @@
<image
class=
"logo-bg"
:src=
"assetsPath +'/publicize/logo.png'"
mode=
"widthFix"
></image>
</view>
<view
class=
"btn-box"
>
<button
class=
"cu-btn"
>
<button
class=
"cu-btn"
@
tap=
"onNavToRule('share_and_register')"
>
活动规则
</button>
</view>
...
...
@@ -124,7 +124,7 @@
<text
class=
"text-gray"
>
入账时间
{{
item
.
createTime
}}
</text>
<view
class=
"flex-row-center"
>
<text
class=
"text-gray margin-right-sm"
>
奖励来源
</text>
<text
class=
"text-black"
>
好友「
凑角用户 1001
」注册成功
</text>
<text
class=
"text-black"
>
好友「
{{
item
.
newNickName
}}
」注册成功
</text>
</view>
</view>
<view
class=
"time-box"
>
...
...
@@ -190,7 +190,8 @@
import
{
equityBindUser
,
equityDuration
,
equityDurationList
equityDurationList
,
getShareList
}
from
"@/api/recharge.js"
import
{
getUserInfo
...
...
@@ -250,19 +251,18 @@
}
},
onLoading
(){
equityDurationList
(
this
.
queryParams
).
then
(
res
=>
{
console
.
log
(
res
,
99999
)
// let list = res.data.rows.map(item => {
// this.userInfo.phone.slice(-4)
// return {
// ...item,
// }
// })
getShareList
(
this
.
queryParams
).
then
(
res
=>
{
let
list
=
res
.
data
.
rows
.
map
(
item
=>
{
return
{
...
item
,
newNickName
:
item
.
newNickName
?
item
.
newNickName
:
'凑角用户_'
+
item
.
newPhone
.
slice
(
-
4
)
}
})
if
(
this
.
queryParams
.
pageNum
===
1
){
this
.
list
=
res
.
data
.
rows
this
.
list
=
list
}
else
{
this
.
list
.
push
(...
res
.
data
.
rows
)
this
.
list
.
push
(...
list
)
}
if
(
this
.
list
.
length
>=
res
.
data
.
total
){
...
...
@@ -323,6 +323,11 @@
},
qrR
(
r
)
{
this
.
qrPath
=
r
;
},
onNavToRule
(
val
){
uni
.
navigateTo
({
url
:
'/setting/rule/rule?keyData='
+
val
})
}
}
}
...
...
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