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
3fc004fa
Commit
3fc004fa
authored
Aug 14, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
功能开发完善
parent
057e3fa2
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
469 additions
and
15 deletions
+469
-15
App.vue
App.vue
+1
-0
recharge.js
api/recharge.js
+12
-0
login.vue
components/login/login.vue
+1
-0
pages.json
pages.json
+15
-1
myInfo.vue
pages/my/myInfo.vue
+46
-9
order.vue
pages/order/order.vue
+5
-3
vipCreate.vue
pages/vipCreate/vipCreate.vue
+2
-1
duration.vue
setting/recharge/duration.vue
+193
-0
integral.vue
setting/recharge/integral.vue
+193
-0
record.vue
setting/recharge/record.vue
+1
-1
No files found.
App.vue
View file @
3fc004fa
...
...
@@ -30,6 +30,7 @@
wx
.
login
({
success
:
(
res
)
=>
{
login
(
res
.
code
).
then
(
res
=>
{
console
.
log
(
res
,
99999
)
if
(
res
.
data
.
code
==
200
)
{
uni
.
setStorageSync
(
'loginStatus'
,
res
.
data
.
data
.
type
)
if
(
res
.
data
.
data
.
type
===
"login"
)
{
...
...
api/recharge.js
View file @
3fc004fa
...
...
@@ -6,6 +6,18 @@ export const recordsList=(data)=>{
return
http
.
get
(
url
,
data
)
}
// 积分日志
export
const
integralList
=
(
data
)
=>
{
let
url
=
`/integralLog/query`
return
http
.
get
(
url
,
data
)
}
// 时长日志
export
const
durationList
=
(
data
)
=>
{
let
url
=
`/durationLog/query`
return
http
.
get
(
url
,
data
)
}
// 充值配置
export
const
rechargeConf
=
(
data
)
=>
{
let
url
=
`/rechargeConf/list`
...
...
components/login/login.vue
View file @
3fc004fa
...
...
@@ -46,6 +46,7 @@
success
:
(
res
)
=>
{
login
(
res
.
code
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
uni
.
setStorageSync
(
'loginStatus'
,
res
.
data
.
data
.
type
)
if
(
res
.
data
.
data
.
type
===
"login"
)
{
uni
.
setStorageSync
(
'tokenHeaders'
,
"Authori-zation"
)
uni
.
setStorage
({
...
...
pages.json
View file @
3fc004fa
...
...
@@ -194,7 +194,21 @@
{
"path"
:
"recharge/record"
,
"style"
:
{
"navigationBarTitleText"
:
"余额使用记录"
,
"navigationBarTitleText"
:
"余额记录"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"recharge/integral"
,
"style"
:
{
"navigationBarTitleText"
:
"积分记录"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"recharge/duration"
,
"style"
:
{
"navigationBarTitleText"
:
"时长记录"
,
"enablePullDownRefresh"
:
false
}
},
...
...
pages/my/myInfo.vue
View file @
3fc004fa
...
...
@@ -26,14 +26,14 @@
<text
class=
"text-2"
>
权益会员
</text>
</view>
</view>
<view
v-if=
"!userInfo.consumerMember || !(userInfo.consumerMember.isRights && userInfo.consumerMember.isRecharge) "
class=
"relative"
@
tap
.
stop=
"onNavToVip"
>
<view
v-if=
"!userInfo.consumerMember || !(userInfo.consumerMember
&& userInfo.consumerMember
.isRights && userInfo.consumerMember.isRecharge) "
class=
"relative"
@
tap
.
stop=
"onNavToVip"
>
<image
class=
"img-icon"
:src=
"assetsPath+'/tag_icon_3.png'"
mode=
"widthFix"
></image>
<view
class=
"absolute"
>
<text
class=
"text-3"
>
普通会员
</text>
</view>
</view>
</view>
<view
v-if=
"userInfo.consumerMember.isRights"
class=
"tip-date"
>
<view
v-if=
"userInfo.consumerMember
&& userInfo.consumerMember
.isRights"
class=
"tip-date"
>
<text>
权益
<text
class=
"text-bold"
>
{{
userInfo
.
consumerMember
.
expirationDate
}}
</text>
到期
</text>
<text
class=
"text-blue"
@
tap
.
stop=
"onOpenEquityMembers"
>
{{
list
&&
list
.
length
?
list
[
0
].
requiredAmount
+
'元'
:
''
}}
续费
</text>
</view>
...
...
@@ -134,7 +134,7 @@
<view
class=
""
></view>
</view>
<view
class=
"flex-row-center"
>
<view
class=
"item-box"
>
<view
class=
"item-box"
@
tap=
"onNavToRecords(1)"
>
<view
class=
"icon-img"
>
<image
:src=
"assetsPath+'/user/wallet_icon_1.png'"
mode=
"scaleToFill"
></image>
</view>
...
...
@@ -145,7 +145,7 @@
<text
class=
"text-black text-lg text-bold"
>
{{
userInfo
.
consumerWallet
.
balance
||
0
}}
</text>
</view>
</view>
<view
class=
"item-box"
>
<view
class=
"item-box"
@
tap=
"onNavToRecords(2)"
>
<view
class=
"icon-img"
>
<image
:src=
"assetsPath+'/user/wallet_icon_2.png'"
mode=
"scaleToFill"
></image>
</view>
...
...
@@ -156,7 +156,7 @@
<text
class=
"text-black text-lg text-bold"
>
{{
userInfo
.
consumerWallet
.
remainingIntegral
||
0
}}
</text>
</view>
</view>
<view
class=
"item-box"
>
<view
class=
"item-box"
@
tap=
"onNavToRecords(3)"
>
<view
class=
"icon-img"
>
<image
:src=
"assetsPath+'/user/wallet_icon_3.png'"
mode=
"scaleToFill"
></image>
</view>
...
...
@@ -375,10 +375,12 @@
</view>
</view>
</uni-popup>
<LoginPop
ref=
"loginPop"
/>
</view>
</
template
>
<
script
>
import
LoginPop
from
"@/components/login/login"
import
fTabbar
from
'@/components/module/f-tabbar/f-tabbar'
;
import
{
getUserInfo
,
...
...
@@ -400,6 +402,7 @@
export
default
{
components
:
{
LoginPop
,
fTabbar
},
data
()
{
...
...
@@ -457,7 +460,8 @@
levelDetail
:
"/setting/levelDetail/index"
},
list
:
''
,
consumerMemberStatus
:
false
consumerMemberStatus
:
false
,
loginStatus
:
uni
.
getStorageSync
(
'loginStatus'
)
==
'login'
?
true
:
false
}
},
onShow
()
{
...
...
@@ -572,9 +576,6 @@
}
},
onClose
()
{
this
.
$refs
.
popup
.
close
()
},
onCopy
()
{
uni
.
setClipboardData
({
data
:
this
.
wifiData
.
password
...
...
@@ -621,9 +622,15 @@
})
},
onNavByPath
(
pathName
){
if
([
"levelDetail"
].
includes
(
pathName
)
&&
!
this
.
loginStatus
){
console
.
log
(
pathName
,
999999
)
this
.
$refs
.
loginPop
.
open
();
}
else
{
uni
.
navigateTo
({
url
:
this
.
routePathEnum
[
pathName
]
})
}
},
onNavToVip
(){
uni
.
switchTab
({
...
...
@@ -699,7 +706,37 @@
})
},
onClose
()
{
this
.
$refs
.
popup
.
close
()
this
.
$refs
.
popupPay
.
close
()
},
onNavToRecords
(
t
){
if
(
this
.
loginStatus
){
if
(
t
==
1
){
if
(
this
.
userInfo
.
consumerMember
&&
this
.
userInfo
.
consumerMember
.
isRecharge
){
uni
.
navigateTo
({
url
:
"/setting/recharge/record"
})
}
else
{
uni
.
showToast
({
icon
:
"none"
,
title
:
"您还未充值哟!"
})
}
}
else
if
(
t
==
2
){
uni
.
navigateTo
({
url
:
"/setting/recharge/integral"
})
}
else
if
(
t
==
3
){
uni
.
navigateTo
({
url
:
"/setting/recharge/duration"
})
}
}
else
{
this
.
$refs
.
loginPop
.
open
();
}
}
}
}
...
...
pages/order/order.vue
View file @
3fc004fa
...
...
@@ -92,7 +92,10 @@
<text>
{{
item
.
labelName
}}
</text>
</view>
<view
v-if=
"item.openPack==1 || (activityDate[dateList[dateIndex].readDate] && activityDate[dateList[dateIndex].readDate].labelIds.includes(item.labelId))"
class=
"pre-icon"
>
<image
:src=
"activityDate[dateList[dateIndex].readDate] && activityDate[dateList[dateIndex].readDate].labelIds.includes(item.labelId)? assetsPath+'/pre_icon_2.png': assetsPath+'/pre_icon.png'"
mode=
"widthFix"
></image>
<image
:src=
"
(item.packId && activityDate[dateList[dateIndex].readDate] && activityDate[dateList[dateIndex].readDate].labelIds.includes(item.labelId) && activityDate[dateList[dateIndex].readDate].packIds.includes(item.packId)) ||
(item.packId && activityDate[dateList[dateIndex].readDate] && activityDate[dateList[dateIndex].readDate].packIds.includes(item.packId)) ||
(!item.packId && activityDate[dateList[dateIndex].readDate] && activityDate[dateList[dateIndex].readDate].labelIds.includes(item.labelId)) ? assetsPath+'/pre_icon_2.png': assetsPath+'/pre_icon.png'"
mode=
"widthFix"
></image>
</view>
</view>
</view>
...
...
@@ -103,7 +106,7 @@
<text>
{{
item
.
name
}}
</text>
</view>
<view
class=
"pre-icon"
>
<image
:src=
"assetsPath+'/pre_icon.png'"
mode=
"widthFix"
></image>
<image
:src=
"
activityDate[dateList[dateIndex].readDate] && activityDate[dateList[dateIndex].readDate].packIds.includes(item.id)? assetsPath+'/pre_icon_2.png' :
assetsPath+'/pre_icon.png'"
mode=
"widthFix"
></image>
</view>
</view>
</view>
...
...
@@ -1093,7 +1096,6 @@
}
}
console
.
log
(
this
.
activityDate
,
"this.activityDate"
)
}
})
},
...
...
pages/vipCreate/vipCreate.vue
View file @
3fc004fa
...
...
@@ -666,10 +666,11 @@
.bg-header
{
display
:
block
;
width
:
100%
;
image
{
display
:
block
;
width
:
100%
;
min-height
:
600
upx
;
}
}
...
...
setting/recharge/duration.vue
0 → 100644
View file @
3fc004fa
<
template
>
<view
class=
"order-record"
>
<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 part-1"
>
<view
class=
""
>
<text
class=
"text-title"
>
{{
item
.
operationType
?
'增加'
:
"消费"
}}
</text>
</view>
<view
class=
"flex-row"
>
<text
class=
"text-bold text-xl"
:class=
"item.sign=='income'?'text-red':'text-black'"
>
{{
item
.
operationType
?
'+'
:
'-'
}}
</text>
<text
class=
"text-black text-bold text-lg"
>
{{
item
.
variableDuration
}}
小时
</text>
</view>
</view>
<view
class=
"flex-between part-1"
>
<text>
{{
item
.
operationTime
}}
</text>
<text>
剩余
{{
item
.
operationType
?
item
.
currentDuration
+
item
.
variableDuration
:
item
.
currentDuration
-
item
.
variableDuration
}}
小时
</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
{
durationList
}
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
,
list
:
[],
statusList
:
[{
label
:
"全部"
,
value
:
""
,
},
{
label
:
"已预约"
,
value
:
"0"
,
},
{
label
:
"使用中"
,
value
:
"1"
,
},
{
label
:
"已完成"
,
value
:
"2"
,
},
{
label
:
"退单"
,
value
:
"3"
,
}
],
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
},
loginStatus
:
true
,
orderStatusEnum
:{},
payTypeEnum
:{
1
:
"微信支付"
,
2
:
"支付宝支付"
,
3
:
"余额支付"
},
payStatus
:{
'0'
:
'-'
,
'1'
:
'+'
},
listBlankImage
:
config
.
assetsPath
+
'/no_data_icon.png'
,
};
},
onLoad
()
{
},
onReachBottom
()
{
if
(
this
.
status
==
'loadmore'
)
{
this
.
queryParams
.
pageNum
+=
1
;
this
.
onLoading
();
}
},
onShow
()
{
this
.
onGetDicts
()
},
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'
this
.
queryParams
.
status
=
this
.
statusList
[
this
.
statusIndex
].
value
;
durationList
(
this
.
queryParams
).
then
(
res
=>
{
console
.
log
(
res
)
uni
.
hideLoading
()
if
(
res
.
data
.
code
==
200
)
{
this
.
list
=
res
.
data
.
data
this
.
status
=
'nomore'
}
else
if
(
res
.
data
.
code
==
401
){
this
.
loginStatus
=
false
}
})
},
tabSelect
(
i
)
{
console
.
log
(
i
,
99999
)
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{
width
:
94%
;
padding
:
20
upx
20
upx
;
border-radius
:
20
upx
;
background-color
:
#ffffff
;
margin-top
:
30
upx
;
.part-1{
display
:
flex
;
align-items
:
center
;
padding
:
10
upx
;
.flex-row{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
}
}
}
}
}
}
</
style
>
\ No newline at end of file
setting/recharge/integral.vue
0 → 100644
View file @
3fc004fa
<
template
>
<view
class=
"order-record"
>
<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 part-1"
>
<view
class=
""
>
<text
class=
"text-title"
>
{{
item
.
operationType
?
'增加'
:
"消费"
}}
</text>
</view>
<view
class=
"flex-row"
>
<text
class=
"text-bold text-xl"
:class=
"item.sign=='income'?'text-red':'text-black'"
>
{{
item
.
operationType
?
'+'
:
'-'
}}
</text>
<text
class=
"text-black text-bold text-lg"
>
{{
item
.
variableIntegral
}}
积分
</text>
</view>
</view>
<view
class=
"flex-between part-1"
>
<text>
{{
item
.
operationTime
}}
</text>
<text>
剩余
{{
item
.
operationType
?
item
.
currentIntegral
+
item
.
variableIntegral
:
item
.
currentIntegral
-
item
.
variableIntegral
}}
积分
</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
{
integralList
}
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
,
list
:
[],
statusList
:
[{
label
:
"全部"
,
value
:
""
,
},
{
label
:
"已预约"
,
value
:
"0"
,
},
{
label
:
"使用中"
,
value
:
"1"
,
},
{
label
:
"已完成"
,
value
:
"2"
,
},
{
label
:
"退单"
,
value
:
"3"
,
}
],
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
},
loginStatus
:
true
,
orderStatusEnum
:{},
payTypeEnum
:{
1
:
"微信支付"
,
2
:
"支付宝支付"
,
3
:
"余额支付"
},
payStatus
:{
'0'
:
'-'
,
'1'
:
'+'
},
listBlankImage
:
config
.
assetsPath
+
'/no_data_icon.png'
,
};
},
onLoad
()
{
},
onReachBottom
()
{
if
(
this
.
status
==
'loadmore'
)
{
this
.
queryParams
.
pageNum
+=
1
;
this
.
onLoading
();
}
},
onShow
()
{
this
.
onGetDicts
()
},
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'
this
.
queryParams
.
status
=
this
.
statusList
[
this
.
statusIndex
].
value
;
integralList
(
this
.
queryParams
).
then
(
res
=>
{
console
.
log
(
res
)
uni
.
hideLoading
()
if
(
res
.
data
.
code
==
200
)
{
this
.
list
=
res
.
data
.
data
this
.
status
=
'nomore'
}
else
if
(
res
.
data
.
code
==
401
){
this
.
loginStatus
=
false
}
})
},
tabSelect
(
i
)
{
console
.
log
(
i
,
99999
)
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{
width
:
94%
;
padding
:
20
upx
20
upx
;
border-radius
:
20
upx
;
background-color
:
#ffffff
;
margin-top
:
30
upx
;
.part-1{
display
:
flex
;
align-items
:
center
;
padding
:
10
upx
;
.flex-row{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
}
}
}
}
}
}
</
style
>
\ No newline at end of file
setting/recharge/record.vue
View file @
3fc004fa
...
...
@@ -5,7 +5,7 @@
<view
v-for=
"(item,index) in list"
:key=
"index"
class=
"list-item"
@
tap=
"onNavToOrderInfo(item)"
>
<view
class=
"flex-between part-1"
>
<view
class=
""
>
<text
class=
"text-title"
>
{{
item
.
operationType
?
'
退款
'
:
"消费"
}}
</text>
<text
class=
"text-title"
>
{{
item
.
operationType
?
'
增加
'
:
"消费"
}}
</text>
</view>
<view
class=
"flex-row"
>
<text
class=
"text-bold text-xl"
:class=
"item.sign=='income'?'text-red':'text-black'"
>
{{
item
.
operationType
?
'+'
:
'-'
}}
</text>
...
...
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