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
5acd57a9
Commit
5acd57a9
authored
Aug 08, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
功能优化
parent
2311cba4
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
269 additions
and
15 deletions
+269
-15
recharge.js
api/recharge.js
+4
-0
pages.json
pages.json
+7
-0
order.vue
pages/order/order.vue
+16
-15
orderResult.vue
pages/orderResult/orderResult.vue
+25
-0
index.vue
setting/recharge/index.vue
+24
-0
record.vue
setting/recharge/record.vue
+193
-0
No files found.
api/recharge.js
View file @
5acd57a9
...
@@ -17,4 +17,8 @@ export const createRecharge=(data)=>{
...
@@ -17,4 +17,8 @@ export const createRecharge=(data)=>{
return
http
.
post
(
url
,
data
)
return
http
.
post
(
url
,
data
)
}
}
export
const
balanceLog
=
(
data
)
=>
{
let
url
=
`/balanceLog/query`
return
http
.
get
(
url
,
data
)
}
pages.json
View file @
5acd57a9
...
@@ -192,6 +192,13 @@
...
@@ -192,6 +192,13 @@
}
}
},
},
{
{
"path"
:
"recharge/record"
,
"style"
:
{
"navigationBarTitleText"
:
"余额使用记录"
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"rule/rule"
,
"path"
:
"rule/rule"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"活动规则"
,
"navigationBarTitleText"
:
"活动规则"
,
...
...
pages/order/order.vue
View file @
5acd57a9
...
@@ -219,13 +219,6 @@
...
@@ -219,13 +219,6 @@
<text
class=
"cuIcon-right "
:class=
"useCouponList.length?'text-pink':'text-gray'"
></text>
<text
class=
"cuIcon-right "
:class=
"useCouponList.length?'text-pink':'text-gray'"
></text>
</view>
</view>
</view>
</view>
<view
v-if=
"computePriceInfo.remainingDuration"
class=
"flex-between price"
>
<text
class=
"text-black text-left"
>
可用时长
</text>
<view
class=
"flex-row"
>
<text
class=
"text-pink text-lg text-bold"
>
{{
computePriceInfo
.
remainingDuration
}}
</text>
<text
class=
"text-pink"
>
小时
</text>
</view>
</view>
<view
v-if=
"computePriceInfo.totalFeeNow"
class=
"flex-between price"
>
<view
v-if=
"computePriceInfo.totalFeeNow"
class=
"flex-between price"
>
<text
class=
"text-black text-left"
>
应付金额
</text>
<text
class=
"text-black text-left"
>
应付金额
</text>
<view
class=
"flex-row"
>
<view
class=
"flex-row"
>
...
@@ -234,11 +227,18 @@
...
@@ -234,11 +227,18 @@
<text
class=
"text-pink text-lg text-bold"
>
{{
computePriceInfo
.
totalFeeNow
||
0
}}
</text>
<text
class=
"text-pink text-lg text-bold"
>
{{
computePriceInfo
.
totalFeeNow
||
0
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"flex-between price"
>
<text
class=
"text-black text-left"
>
可用时长
</text>
<view
class=
"flex-row"
>
<text
class=
"text-pink text-lg text-bold"
>
{{
Number
(
computePriceInfo
.
availableDuration
).
toFixed
(
1
)
}}
</text>
<text
class=
"text-pink"
>
小时
</text>
</view>
</view>
<view
v-if=
"computePriceInfo.duration"
class=
"flex-between price"
>
<view
v-if=
"computePriceInfo.duration"
class=
"flex-between price"
>
<text
class=
"text-black text-left"
>
时长抵扣
</text>
<text
class=
"text-black text-left"
>
时长抵扣
</text>
<view
class=
"flex-row"
>
<view
class=
"flex-row"
>
<text
class=
"text-pink
"
>
¥
</text>
<text
class=
"text-pink
text-lg text-bold"
>
{{
Number
(
computePriceInfo
.
duration
).
toFixed
(
1
)
}}
</text>
<text
class=
"text-pink text-lg text-bold"
>
{{
computePriceInfo
.
duration
||
0
}}
</text>
<text
>
小时
</text>
</view>
</view>
</view>
</view>
<view
v-if=
"computePriceInfo.remainingBalance"
class=
"flex-between price"
>
<view
v-if=
"computePriceInfo.remainingBalance"
class=
"flex-between price"
>
...
@@ -247,20 +247,21 @@
...
@@ -247,20 +247,21 @@
<text
class=
"text-pink"
>
优先使用钱包余额
</text>
<text
class=
"text-pink"
>
优先使用钱包余额
</text>
</view>
</view>
</view>
</view>
<view
v-if=
"computePriceInfo.
b
alance"
class=
"flex-between price"
>
<view
v-if=
"computePriceInfo.
availableB
alance"
class=
"flex-between price"
>
<text
class=
"text-black text-left"
>
余额抵扣
</text>
<text
class=
"text-black text-left"
>
可用余额
</text>
<view
class=
"flex-row"
>
<view
class=
"flex-row"
>
<text
class=
"text-pink"
>
¥
</text>
<text
class=
"text-pink"
>
¥
</text>
<text
class=
"text-pink text-lg text-bold"
>
{{
computePriceInfo
.
b
alance
}}
</text>
<text
class=
"text-pink text-lg text-bold"
>
{{
computePriceInfo
.
availableB
alance
}}
</text>
</view>
</view>
</view>
</view>
<view
v-if=
"computePriceInfo.
remainingB
alance"
class=
"flex-between price"
>
<view
v-if=
"computePriceInfo.
b
alance"
class=
"flex-between price"
>
<text
class=
"text-black text-left"
>
钱包余额
</text>
<text
class=
"text-black text-left"
>
余额抵扣
</text>
<view
class=
"flex-row"
>
<view
class=
"flex-row"
>
<text
class=
"text-pink"
>
¥
</text>
<text
class=
"text-pink"
>
¥
</text>
<text
class=
"text-pink text-lg text-bold"
>
{{
computePriceInfo
.
remainingB
alance
}}
</text>
<text
class=
"text-pink text-lg text-bold"
>
{{
computePriceInfo
.
b
alance
}}
</text>
</view>
</view>
</view>
</view>
<view
v-if=
"computePriceInfo.totalFee - computePriceInfo.totalFeeNow > 0"
class=
"flex-between price"
>
<view
v-if=
"computePriceInfo.totalFee - computePriceInfo.totalFeeNow > 0"
class=
"flex-between price"
>
<view
class=
"flex-row-center"
>
<view
class=
"flex-row-center"
>
<text
class=
"text-black text-left"
>
会员折扣
</text>
<text
class=
"text-black text-left"
>
会员折扣
</text>
...
...
pages/orderResult/orderResult.vue
View file @
5acd57a9
...
@@ -53,6 +53,15 @@
...
@@ -53,6 +53,15 @@
<text
class=
"text-gray "
>
订单编号
</text>
<text
class=
"text-gray "
>
订单编号
</text>
<text
class=
"text-title "
>
{{
orderInfo
.
orderNo
||
'-'
}}
</text>
<text
class=
"text-title "
>
{{
orderInfo
.
orderNo
||
'-'
}}
</text>
</view>
</view>
<view
class=
"flex-between"
>
<text
class=
"text-gray "
>
订单应付
</text>
<view
class=
"flex-row"
style=
"align-items: center;text-decoration-line: line-through;"
>
<text
class=
"text-lg"
>
{{
orderInfo
.
totalPrice
||
'0'
}}
</text>
<text
style=
"margin-left: 4upx;"
>
元
</text>
</view>
</view>
<view
v-if=
"orderInfo.packName"
class=
"flex-between"
>
<view
v-if=
"orderInfo.packName"
class=
"flex-between"
>
<text
class=
"text-gray "
>
购买套餐
</text>
<text
class=
"text-gray "
>
购买套餐
</text>
<text
class=
"text-title "
>
{{
orderInfo
.
packName
||
'-'
}}
</text>
<text
class=
"text-title "
>
{{
orderInfo
.
packName
||
'-'
}}
</text>
...
@@ -65,6 +74,22 @@
...
@@ -65,6 +74,22 @@
<text
class=
"text-gray"
>
优惠券抵扣
</text>
<text
class=
"text-gray"
>
优惠券抵扣
</text>
<text
class=
"text-title"
>
{{
orderInfo
.
couponName
}}
</text>
<text
class=
"text-title"
>
{{
orderInfo
.
couponName
}}
</text>
</view>
</view>
<view
v-if=
"orderInfo.duration"
class=
"flex-between"
>
<text
class=
"text-gray"
>
时长抵扣
</text>
<view
class=
""
>
<text
class=
"text-title"
>
{{
orderInfo
.
duration
}}
</text>
<text>
小时
</text>
</view>
</view>
<!--
<view
v-if=
"orderInfo.discountRatio"
class=
"flex-between"
>
<text
class=
"text-gray"
>
折扣优惠
</text>
<view
class=
""
>
<text
class=
"text-title"
>
{{
orderInfo
.
discountRatio
}}
</text>
</view>
</view>
-->
<view
v-if=
"orderInfo.balance>0"
class=
"flex-between"
>
<view
v-if=
"orderInfo.balance>0"
class=
"flex-between"
>
<text
class=
"text-gray"
>
余额支付
</text>
<text
class=
"text-gray"
>
余额支付
</text>
<view
class=
"flex-row"
style=
"align-items: center;"
>
<view
class=
"flex-row"
style=
"align-items: center;"
>
...
...
setting/recharge/index.vue
View file @
5acd57a9
<
template
>
<
template
>
<view
class=
"order-record"
>
<view
class=
"order-record"
>
<view
class=
"flex-between record-box"
>
<view
class=
""
>
</view>
<view
class=
"text-btn"
@
tap=
"onNav"
>
<text>
使用记录
</text>
<text
class=
"cuIcon-right"
></text>
</view>
</view>
<view
v-if=
"loginStatus"
class=
"content-box"
>
<view
v-if=
"loginStatus"
class=
"content-box"
>
<view
class=
"list-content"
>
<view
class=
"list-content"
>
<view
v-for=
"(item,index) in list"
:key=
"index"
class=
"list-item"
@
tap=
"onNavToOrderInfo(item)"
>
<view
v-for=
"(item,index) in list"
:key=
"index"
class=
"list-item"
@
tap=
"onNavToOrderInfo(item)"
>
...
@@ -176,6 +185,11 @@ import NoLogin from "@/components/noLogin/noLogin"
...
@@ -176,6 +185,11 @@ import NoLogin from "@/components/noLogin/noLogin"
this
.
list
=
[]
this
.
list
=
[]
this
.
onLoading
()
this
.
onLoading
()
},
},
onNav
(){
uni
.
navigateTo
({
url
:
"/setting/recharge/record"
})
},
onNavToOrderInfo
(
val
){
onNavToOrderInfo
(
val
){
// uni.navigateTo({
// uni.navigateTo({
// url:"/pages/orderResult/orderResult?orderNo="+val.orderNo
// url:"/pages/orderResult/orderResult?orderNo="+val.orderNo
...
@@ -193,6 +207,16 @@ import NoLogin from "@/components/noLogin/noLogin"
...
@@ -193,6 +207,16 @@ import NoLogin from "@/components/noLogin/noLogin"
.order-record
{
.order-record
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
.record-box{
padding
:
24
upx
24
upx
0
;
.text-btn{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
color
:
#55aaff
;
font-size
:
30
upx
;
}
}
.content-box
{
.content-box
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
...
...
setting/recharge/record.vue
0 → 100644
View file @
5acd57a9
<
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
.
variableAmount
}}
元
</text>
</view>
</view>
<view
class=
"flex-between part-1"
>
<text>
{{
item
.
operationTime
}}
</text>
<text>
{{
item
.
payType
}}
</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
{
balanceLog
}
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
;
balanceLog
(
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
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