Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
X
xzf_uniapp-wechat-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
李智书
xzf_uniapp-wechat-web
Commits
e6851784
Commit
e6851784
authored
Jul 24, 2023
by
lizhishu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into uat
parents
995d2555
ebadde84
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
4075 additions
and
2 deletions
+4075
-2
src/manifest.json
src/manifest.json
+10
-2
src/pages.json
src/pages.json
+110
-0
src/pages/ApplyConsumption/CommonProblem/CommonProblem.vue
src/pages/ApplyConsumption/CommonProblem/CommonProblem.vue
+239
-0
src/pages/ApplyConsumption/ConsumptIoninfo/ConsumptIoninfo.vue
...ages/ApplyConsumption/ConsumptIoninfo/ConsumptIoninfo.vue
+510
-0
src/pages/ApplyConsumption/ConsumptionQuota/ConsumptionQuota.vue
...es/ApplyConsumption/ConsumptionQuota/ConsumptionQuota.vue
+964
-0
src/pages/ApplyConsumption/Home/Home.vue
src/pages/ApplyConsumption/Home/Home.vue
+492
-0
src/pages/ApplyConsumption/OrderClearSuspicions/OrderClearSuspicions.vue
...Consumption/OrderClearSuspicions/OrderClearSuspicions.vue
+69
-0
src/pages/ApplyConsumption/apply.md
src/pages/ApplyConsumption/apply.md
+1
-0
src/pages/ApplyConsumption/common/config.js
src/pages/ApplyConsumption/common/config.js
+44
-0
src/pages/ApplyConsumption/common/request.js
src/pages/ApplyConsumption/common/request.js
+62
-0
src/pages/ApplyConsumption/consumptionDetail/consumptionDetail.vue
.../ApplyConsumption/consumptionDetail/consumptionDetail.vue
+178
-0
src/pages/ApplyConsumption/consumptionRecord/consumptionRecord.vue
.../ApplyConsumption/consumptionRecord/consumptionRecord.vue
+237
-0
src/pages/ApplyConsumption/pendingOrder/pendingOrder.vue
src/pages/ApplyConsumption/pendingOrder/pendingOrder.vue
+295
-0
src/pages/ApplyConsumption/pendingOrderDetail/pendingOrderDetail.vue
...pplyConsumption/pendingOrderDetail/pendingOrderDetail.vue
+279
-0
src/pages/ApplyConsumption/rechargeDetail/rechargeDetail.vue
src/pages/ApplyConsumption/rechargeDetail/rechargeDetail.vue
+236
-0
src/pages/ApplyConsumption/topupDetail/topupDetail.vue
src/pages/ApplyConsumption/topupDetail/topupDetail.vue
+349
-0
src/static/images/choice.png
src/static/images/choice.png
+0
-0
No files found.
src/manifest.json
View file @
e6851784
...
@@ -89,9 +89,17 @@
...
@@ -89,9 +89,17 @@
"disableHostCheck"
:
true
,
"disableHostCheck"
:
true
,
"proxy"
:
{
"proxy"
:
{
"/"
:
{
"/"
:
{
"target"
:
"https://
dev-az-cloud-api
.xiaopay.net"
,
"target"
:
"https://
fpdev
.xiaopay.net"
,
"changeOrigin"
:
true
,
"changeOrigin"
:
true
,
"secure"
:
false
"secure"
:
false
},
"/cgi-xpay"
:
{
"target"
:
"https://fpdev.xiaopay.net"
,
"changeOrigin"
:
true
,
"secure"
:
false
,
"pathRewrite"
:
{
"/cgi-xpay"
:
"/"
}
}
}
}
}
},
},
...
@@ -115,4 +123,4 @@
...
@@ -115,4 +123,4 @@
"enable"
:
true
"enable"
:
true
}
}
}
}
}
}
\ No newline at end of file
src/pages.json
View file @
e6851784
...
@@ -488,6 +488,116 @@
...
@@ -488,6 +488,116 @@
}
}
}
}
,{
"path"
:
"pages/ApplyConsumption/Home/Home"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"校园消费"
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/ApplyConsumption/CommonProblem/CommonProblem"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"常见问题"
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/ApplyConsumption/ConsumptIoninfo/ConsumptIoninfo"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"消费记录"
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/ApplyConsumption/ConsumptionQuota/ConsumptionQuota"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"消费限额"
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/ApplyConsumption/OrderClearSuspicions/OrderClearSuspicions"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"待还款订单"
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/ApplyConsumption/pendingOrder/pendingOrder"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"待还款订单"
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/ApplyConsumption/consumptionDetail/consumptionDetail"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"消费详情"
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/ApplyConsumption/rechargeDetail/rechargeDetail"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"充值详情"
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/ApplyConsumption/topupDetail/topupDetail"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"充值明细"
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/ApplyConsumption/consumptionRecord/consumptionRecord"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"消费记录"
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/ApplyConsumption/pendingOrderDetail/pendingOrderDetail"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"消费详情"
,
"enablePullDownRefresh"
:
false
}
}
],
],
"globalStyle"
:
{
"globalStyle"
:
{
"navigationBarTextStyle"
:
"black"
,
"navigationBarTextStyle"
:
"black"
,
...
...
src/pages/ApplyConsumption/CommonProblem/CommonProblem.vue
0 → 100644
View file @
e6851784
<
template
>
<view
class=
"CommonProblem container"
>
<view
class=
"questionbox"
>
<view
class=
"questionList"
v-for=
"(item,index) in questionList"
:key=
"index"
@
tap=
"jumpClick(item.jumurl,item.jumtype)"
>
<view
class=
"line1"
>
<view
class=
"lable"
>
<text>
{{
item
.
alable
}}
</text>
</view>
<view
class=
"content"
>
{{
(
index
+
1
)
+
'
.
'
+
item
.
question
}}
</view>
</view>
<view
class=
"line2"
>
<view
class=
"lable"
>
<text>
{{
item
.
qlable
}}
</text>
</view>
<view
class=
"content"
>
<text>
{{
item
.
answer
}}
</text>
</view>
</view>
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
name
:
"
CommonProblem
"
,
data
()
{
return
{
ImgUrl2
:
this
.
$ImgUrl
+
'
xzfalipay/
'
,
"
questionList
"
:
[{
"
jumurl
"
:
""
,
"
jumtype
"
:
"
1
"
,
"
qlable
"
:
"
问
"
,
"
alable
"
:
"
答
"
,
"
question
"
:
"
学生在校外刷脸,会扣家长的钱么?
"
,
"
answer
"
:
"
一脸通行服务仅限校园内使用。在不同的学校使用刷脸服务需要用户分别去开通。
"
},
{
"
jumurl
"
:
""
,
"
jumtype
"
:
"
1
"
,
"
qlable
"
:
"
问
"
,
"
alable
"
:
"
答
"
,
"
question
"
:
"
学生刷脸的照片或信息会泄露么?
"
,
"
answer
"
:
"
一脸通行集成了支付宝刷脸算法和支付能力,具有金融级准确性和安全性。人脸数据由支付宝管理,用户可以随时关闭刷脸服务。
"
},
{
"
jumurl
"
:
""
,
"
jumtype
"
:
"
1
"
,
"
qlable
"
:
"
问
"
,
"
alable
"
:
"
答
"
,
"
question
"
:
"
孩子可以正常刷脸取餐,为什么会产生欠费?
"
,
"
answer
"
:
"
校园刷脸采用“先取餐后扣费”的模式,账户余额不足就会产生欠费订单。请及时偿还,否则无法继续刷脸吃饭。
"
},
{
"
jumurl
"
:
""
,
"
jumtype
"
:
"
1
"
,
"
qlable
"
:
"
问
"
,
"
alable
"
:
"
答
"
,
"
question
"
:
"
为什么有订单刷脸时间和扣款时间不一致?
"
,
"
answer
"
:
"
为保障孩子及时就餐,只要账户未欠款,孩子刷脸成功后就可以先取餐,由于学校网络原因,扣款时间可能晚于刷脸时间。
"
},
{
"
jumurl
"
:
""
,
"
jumtype
"
:
"
1
"
,
"
qlable
"
:
"
问
"
,
"
alable
"
:
"
答
"
,
"
question
"
:
"
开通刷脸时,提示“相同名称的孩子已存在”怎么办?
"
,
"
answer
"
:
"
平台安全合规限制,一个支付宝账号,不能绑定重名的孩子。出现该情况的原因是,您的支付宝账号使用其他证件号绑定了同名孩子,需要在刷脸服务管理中,关闭之前的开通记录,才能使用新的证件号进行开通刷脸服务。
"
},
{
"
jumurl
"
:
""
,
"
jumtype
"
:
"
1
"
,
"
qlable
"
:
"
问
"
,
"
alable
"
:
"
答
"
,
"
question
"
:
"
跳转到一脸通行小程序采脸时,为什么会提示:ISV操作学校水平受限?
"
,
"
answer
"
:
"
您在开通时刷脸服务时,选择输入的学校未配置支付宝一脸通行服务,请检查选择的学校信息是否正确,或者联系学校工作人员修改学校配置信息。
"
},
{
"
jumurl
"
:
""
,
"
jumtype
"
:
"
1
"
,
"
qlable
"
:
"
问
"
,
"
alable
"
:
"
答
"
,
"
question
"
:
"
一脸通行刷脸支付支持信用卡和花呗支付吗?
"
,
"
answer
"
:
"
因支付宝平台安全合规限制,不支持信用卡与花呗。
"
}
]
};
},
onLoad
:
function
()
{
this
.
GetQuestionList
()
},
methods
:
{
// 获取问题列表
async
GetQuestionList
()
{
try
{
uni
.
showLoading
({
title
:
"
请稍后
"
,
// #ifndef MP-ALIPAY
mask
:
true
,
// #endif
})
const
[
err
,
data
]
=
await
uni
.
request
({
url
:
this
.
ImgUrl2
+
'
question.json
'
,
})
console
.
warn
(
data
)
if
(
Array
.
isArray
(
data
.
questionList
))
{
this
.
questionList
=
data
.
questionList
}
uni
.
hideLoading
()
}
catch
(
error
)
{
console
.
warn
(
error
)
uni
.
showToast
({
icon
:
"
error
"
,
title
:
error
.
message
})
}
},
// 扩展跳转
jumpClick
(
jumurl
,
jumtype
)
{
if
(
!
jumurl
)
{
return
}
switch
(
jumtype
)
{
case
'
1
'
:
uni
.
navigateTo
({
url
:
jumurl
,
fail
:
()
=>
{
uni
.
switchTab
({
url
:
jumurl
})
}
})
break
;
case
'
2
'
:
uni
.
navigateTo
({
url
:
'
/pages_subpack/pages/ClsWeekReport/main?ExternalLink=
'
+
encodeURIComponent
(
jumurl
)
});
break
;
case
'
3
'
:
uni
.
navigateToMiniProgram
({
appId
:
jumurl
});
break
;
default
:
break
;
}
},
}
}
</
script
>
<
style
lang=
"scss"
>
page
{
width
:
100%
;
background
:
#F3F3F3
;
}
.CommonProblem
{
padding-top
:
24rpx
;
padding-bottom
:
100rpx
;
.questionbox
{
width
:
702rpx
;
background
:
#FFFFFF
;
border-radius
:
16rpx
;
margin
:
0
auto
;
.questionList
{
padding-left
:
32rpx
;
padding-top
:
39rpx
;
border-bottom
:
2rpx
solid
#E4E4E4
;
padding-bottom
:
40rpx
;
.lable
{
width
:
44rpx
;
height
:
44rpx
;
font-size
:
28rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#FFFFFF
;
line-height
:
44rpx
;
text-align
:
center
;
}
.line1
{
display
:
flex
;
// justify-content: space-between;
.lable
{
background
:
#04B871
;
}
.content
{
// height: 40rpx;
width
:
572rpx
;
font-size
:
28rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#333333
;
line-height
:
40rpx
;
margin-right
:
32rpx
;
margin-left
:
22rpx
;
}
}
.line2
{
display
:
flex
;
margin-top
:
17rpx
;
// justify-content: space-between;
.lable
{
background
:
#F9BA0C
;
}
.content
{
width
:
572rpx
;
font-size
:
28rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#999999
;
line-height
:
40rpx
;
margin-right
:
32rpx
;
margin-left
:
22rpx
;
}
}
}
}
}
</
style
>
\ No newline at end of file
src/pages/ApplyConsumption/ConsumptIoninfo/ConsumptIoninfo.vue
0 → 100644
View file @
e6851784
This diff is collapsed.
Click to expand it.
src/pages/ApplyConsumption/ConsumptionQuota/ConsumptionQuota.vue
0 → 100644
View file @
e6851784
This diff is collapsed.
Click to expand it.
src/pages/ApplyConsumption/Home/Home.vue
0 → 100644
View file @
e6851784
This diff is collapsed.
Click to expand it.
src/pages/ApplyConsumption/OrderClearSuspicions/OrderClearSuspicions.vue
0 → 100644
View file @
e6851784
<
template
>
<view
class=
"OrderClearSuspicions"
>
<view
class=
"problem"
>
<span>
为什么有待支付订单?
</span>
</view>
<view
class=
"problemdesc"
>
校园刷脸消费采用“先取餐后扣费”模式。孩子刷脸后验证是本人后先取餐,平台再进行扣费,账户余额不足就会产生欠费订单。请及时支付,否则后续无法继续刷脸吃饭。
</view>
<view
class=
"step_guide"
>
<image
:src=
"this.$ImgUrl + 'applyCons/step_guide.png'"
mode=
"aspectFit"
></image>
</view>
</view>
</
template
>
<
script
>
export
default
{
name
:
"
OrderClearSuspicions
"
,
data
()
{
return
{
ImgUrl
:
this
.
$ImgUrl
,
};
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
page
{
width
:
100%
;
background
:
#E4F3EE
;
}
.OrderClearSuspicions
{
.step_guide
{
width
:
686rpx
;
height
:
1484rpx
;
margin
:
0
auto
;
margin-top
:
40rpx
;
image
{
position
:
relative
;
height
:
100%
;
width
:
100%
;
}
}
.problemdesc
{
width
:
677rpx
;
height
:
111rpx
;
font-size
:
26rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
rgba
(
0
,
0
,
0
,
0
.5
);
line-height
:
37rpx
;
margin
:
0
auto
;
margin-top
:
16rpx
;
}
.problem
{
text-align
:
center
;
height
:
54rpx
;
font-size
:
36rpx
;
font-family
:
SourceHanSansSC-Bold
,
SourceHanSansSC
;
font-weight
:
bold
;
color
:
rgba
(
0
,
0
,
0
,
0
.85
);
line-height
:
54rpx
;
padding-top
:
49rpx
;
}
}
</
style
>
\ No newline at end of file
src/pages/ApplyConsumption/apply.md
0 → 100644
View file @
e6851784
H5消费应用模块
\ No newline at end of file
src/pages/ApplyConsumption/common/config.js
0 → 100644
View file @
e6851784
/**
* @name
*全局配置文件
*
*/
let
baseURL
=
"
https://
"
+
window
.
location
.
host
;
let
env
=
'
dev
'
if
(
window
.
location
.
protocol
!=
"
https:
"
)
{
env
=
"
dev
"
;
baseURL
=
'
https://fpdev.xiaopay.net
'
}
if
(
window
.
location
.
host
==
'
fpdev.xiaopay.net
'
)
{
env
=
"
dev
"
;
baseURL
=
'
https://fpdev.xiaopay.net
'
}
if
(
window
.
location
.
host
==
'
uat.xiaopay.net
'
)
{
env
=
"
test
"
;
baseURL
=
'
https://uat.xiaopay.net
'
}
if
(
window
.
location
.
host
==
'
pay.xiaopay.net
'
)
{
env
=
"
product
"
;
baseURL
=
'
https://pay.xiaopay.net
'
}
const
ServiceEnum
=
{
Auth1
:
'
1001
'
,
//'消费方式-刷脸模式',
Auth2
:
'
1002
'
,
//'消费周报/月报',
Auth3
:
'
1003
'
,
//'消费方式-刷卡模式',
Auth4
:
'
1004
'
,
//'扣款方式-微信代扣',
Auth5
:
'
1005
'
,
//'扣款方式-钱包代扣',
Auth6
:
'
1006
'
,
//'在线充值',
Auth7
:
'
1007
'
,
//'微信垫资',
Auth8
:
'
1008
'
,
//'家长自定义限额',
Auth9
:
'
1009
'
,
//'微信公众号推送',
Auth10
:
'
1010
'
,
//'消费记录明细',
Auth11
:
'
1011
'
,
//'每日异常小报告'
}
const
json
=
{
env
,
baseURL
,
ServiceEnum
}
export
default
json
;
\ No newline at end of file
src/pages/ApplyConsumption/common/request.js
0 → 100644
View file @
e6851784
/**
*
* 请求封装
*
*/
import
config
from
'
./config.js
'
const
HEADER
=
{
'
content-type
'
:
'
application/json
'
};
//头部
const
baseURL
=
''
const
request
=
options
=>
{
let
headerObj
=
HEADER
;
const
token
=
uni
.
getStorageSync
(
'
token
'
);
if
(
token
)
{
headerObj
=
{
'
Authorization
'
:
token
,
...
HEADER
}
}
if
(
options
.
data
.
header
)
{
headerObj
=
Object
.
assign
(
headerObj
,
options
.
data
.
header
||
{})
}
return
new
Promise
((
resolve
,
reject
)
=>
{
uni
.
request
({
url
:
baseURL
+
options
.
url
,
method
:
options
.
method
||
'
GET
'
,
header
:
headerObj
,
data
:
options
.
data
||
{},
dataType
:
'
json
'
,
success
:
res
=>
{
if
(
res
.
statusCode
!=
200
)
{
reject
(
res
);
return
}
resolve
(
res
.
data
||
false
);
},
fail
:
err
=>
{
reject
(
err
);
}
});
});
};
export
const
requestGet
=
(
url
,
data
)
=>
{
return
request
({
method
:
'
GET
'
,
url
,
data
})
}
export
const
requestPost
=
(
url
,
data
)
=>
{
return
request
({
method
:
'
POST
'
,
url
,
data
})
}
\ No newline at end of file
src/pages/ApplyConsumption/consumptionDetail/consumptionDetail.vue
0 → 100644
View file @
e6851784
<
template
>
<view
class=
"consumptionDetail"
>
<view
class=
"contentWrapper"
>
<view
class=
"wrapper"
>
<view
class=
"topBg"
:style=
"'background-image: url('+this.$ImgUrl + 'user/greyBgTop.png'+')'"
>
<view
class=
"line"
></view>
</view>
<view
class=
"title"
>
东门食堂-早餐
</view>
<view
class=
"amount"
>
-24.50
</view>
<view
class=
"status"
>
待支付
</view>
<view
class=
"rowItem"
>
<view
class=
"label"
>
学生姓名
</view>
<view
class=
"value"
>
安小智
</view>
</view>
<view
class=
"rowItem"
>
<view
class=
"label"
>
年级班级
</view>
<view
class=
"value"
>
三年级/101班
</view>
</view>
<view
class=
"rowItem"
>
<view
class=
"label"
>
手续费
</view>
<view
class=
"value"
>
0.02
</view>
</view>
<view
class=
"rowItem"
>
<view
class=
"label"
>
消费设备
</view>
<view
class=
"value"
>
消费机-1
</view>
</view>
<view
class=
"rowItem"
>
<view
class=
"label"
>
消费场景
</view>
<view
class=
"value"
>
食堂
</view>
</view>
<view
class=
"rowItem"
>
<view
class=
"label"
>
消费时间
</view>
<view
class=
"value"
>
2022-06-11 07:00.00
</view>
</view>
<view
class=
"rowItem"
>
<view
class=
"label"
>
交易订单号
</view>
<view
class=
"value"
>
4202000000000000000000
</view>
</view>
<view
class=
"btn"
>
<view
class=
"button"
>
对此订单有疑问?
</view>
</view>
</view>
<view
class=
"bottomBg"
:style=
"'background-image: url('+this.$ImgUrl + 'user/greyBgBottom.png'+')'"
></view>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
ImgUrl
:
this
.
$ImgUrl
,
}
},
methods
:
{
}
}
</
script
>
<
style
lang=
"scss"
>
.consumptionDetail
{
width
:
100%
;
height
:
100%
;
min-height
:
100vh
;
background
:
#F1F1F3
;
.contentWrapper
{
padding
:
25rpx
22rpx
0
25rpx
;
display
:
flex
;
flex-direction
:
column
;
.wrapper
{
margin
:
0
8rpx
;
padding-top
:
59rpx
;
width
:
686rpx
;
display
:
flex
;
flex-direction
:
column
;
background
:
white
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
position
:
relative
;
.topBg
{
position
:
absolute
;
top
:
0
;
left
:
-8rpx
;
width
:
703rpx
;
height
:
59rpx
;
background-size
:
cover
;
background-position
:
center
center
;
z-index
:
1
;
.line
{
width
:
686rpx
;
height
:
22rpx
;
margin-top
:
9rpx
;
margin-left
:
8rpx
;
background
:
linear-gradient
(
180deg
,
#D9D9D9
0%
,
#FFFFFF
100%
);
opacity
:
0
.75
;
}
}
.title
{
margin-top
:
46rpx
;
width
:
100%
;
height
:
42rpx
;
font-size
:
30rpx
;
font-weight
:
400
;
color
:
#333333
;
line-height
:
42rpx
;
text-align
:
center
;
}
.amount
{
margin-top
:
4rpx
;
width
:
100%
;
height
:
90rpx
;
font-size
:
64rpx
;
color
:
#333333
;
line-height
:
90rpx
;
text-align
:
center
;
}
.status
{
width
:
100%
;
height
:
45rpx
;
font-size
:
32rpx
;
color
:
#FA6400
;
line-height
:
45rpx
;
text-align
:
center
;
margin-bottom
:
92rpx
;
}
.rowItem
{
padding
:
0
32rpx
;
margin-bottom
:
37rpx
;
display
:
inline-flex
;
justify-content
:
space-between
;
height
:
42rpx
;
line-height
:
42rpx
;
font-size
:
30rpx
;
color
:
#333333
;
.value
{
color
:
rgba
(
0
,
0
,
0
,
0
.5
);
}
}
.btn
{
padding
:
49rpx
0
35rpx
;
.button
{
margin
:
0
auto
;
width
:
622rpx
;
height
:
71rpx
;
line-height
:
71rpx
;
background
:
#F1F1F3
;
border-radius
:
12rpx
;
text-align
:
center
;
font-size
:
28rpx
;
color
:
rgba
(
0
,
0
,
0
,
0
.5
);
}
}
}
.bottomBg
{
width
:
686rpx
;
height
:
29rpx
;
background-size
:
cover
;
background-position
:
center
center
;
margin
:
0
8rpx
;
}
}
}
</
style
>
\ No newline at end of file
src/pages/ApplyConsumption/consumptionRecord/consumptionRecord.vue
0 → 100644
View file @
e6851784
<
template
>
<view
class=
"consumptionRecord"
>
<view
class=
"firstLine"
>
<view
class=
"left"
@
click=
"show = true"
>
<view>
{{
currentDate
}}
</view>
<view
class=
"arrowImg"
:style=
"'background-image: url('+ImgUrl + 'user/arrowDown.png'+')'"
></view>
</view>
<view
class=
"right"
>
<view
class=
"font28"
>
¥
</view>
<view
class=
"font40"
>
40.00
</view>
</view>
</view>
<van-tabs
v-model=
"active"
title-active-color=
"#323233"
title-inactive-color=
"#969799"
line-height=
"4px"
color=
"#04B871"
>
<van-tab
title=
"全部"
:title-style=
"active == 0 ? 'font-weight: bold' : ''"
></van-tab>
<van-tab
title=
"待支付"
:title-style=
"active == 1 ? 'font-weight: bold' : ''"
></van-tab>
<van-tab
title=
"已支付"
:title-style=
"active == 2 ? 'font-weight: bold' : ''"
></van-tab>
<van-tab
title=
"已退款"
:title-style=
"active == 3 ? 'font-weight: bold' : ''"
></van-tab>
</van-tabs>
<scroll-view
scroll-y=
"true"
class=
"scrollY"
>
<view
class=
"pannels"
>
<view
class=
"item"
>
<view
class=
"p1"
>
<view
class=
"left"
>
<view>
二食堂卤面小炒
</view>
<view
class=
"meal"
>
早餐
</view>
</view>
<view
class=
"num"
>
-10.00
</view>
</view>
<view
class=
"p2"
>
08-09 08:02:01
</view>
</view>
<view
class=
"item"
>
<view
class=
"p1"
>
<view
class=
"left"
>
<view>
二食堂卤面小炒
</view>
<view
class=
"meal"
>
早餐
</view>
</view>
<view
class=
"num"
>
-10.00
</view>
</view>
<view
class=
"p2"
>
2023-08-09 08:02:01
</view>
</view>
<view
class=
"item"
>
<view
class=
"p1"
>
<view
class=
"left"
>
<view>
二食堂卤面小炒
</view>
<view
class=
"meal"
>
早餐
</view>
</view>
<view
class=
"num"
>
-10.00
</view>
</view>
<view
class=
"p2"
>
08-09 08:02:01
</view>
</view>
</view>
<view
class=
"bottomTip"
>
— 已展示全部数据 —
</view>
<view
class=
"popup"
v-if=
"show"
>
<van-datetime-picker
:value=
"currentDate"
type=
"year-month"
title=
"选择年月"
:min-date=
"minDate"
position=
"bottom"
:max-date=
"maxDate"
:formatter=
"formatter"
@
confirm=
"onConfirm"
@
cancel=
"onCancel"
/>
</view>
</scroll-view>
</view>
</
template
>
<
script
>
import
moment
from
"
moment
"
;
import
{
DatetimePicker
}
from
'
vant
'
;
export
default
{
data
()
{
return
{
active
:
0
,
ImgUrl
:
this
.
$ImgUrl
,
minDate
:
new
Date
(
2022
,
10
,
0
),
maxDate
:
new
Date
(
2999
,
10
,
1
),
currentDate
:
''
,
show
:
false
,
}
},
created
()
{
this
.
currentDate
=
moment
(
new
Date
()).
format
(
'
YYYY年M月
'
);
},
methods
:
{
formatter
(
type
,
val
)
{
if
(
type
===
'
year
'
)
{
return
`
${
val
}
年`
;
}
else
if
(
type
===
'
month
'
)
{
return
`
${
val
}
月`
;
}
return
val
;
},
onConfirm
(
val
)
{
this
.
currentDate
=
moment
(
val
).
format
(
'
YYYY年M月
'
)
this
.
show
=
false
},
onCancel
()
{
this
.
show
=
false
}
}
}
</
script
>
<
style
lang=
"scss"
>
.consumptionRecord
{
width
:
100%
;
height
:
100%
;
min-height
:
calc
(
100vh
-
calc
(
44px
+
env
(
safe-area-inset-top
)));
background
:
#F1F1F3
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
.firstLine
{
display
:
inline-flex
;
justify-content
:
space-between
;
height
:
88rpx
;
line-height
:
88rpx
;
width
:
calc
(
100%
-
130rpx
);
padding
:
0
38rpx
0
92rpx
;
background
:
#FFFFFF
;
border-top
:
1rpx
solid
#E5E5E5
;
border-bottom
:
1rpx
solid
#E5E5E5
;
font-size
:
30rpx
;
color
:
#333333
;
.left
,
.right
{
display
:
inline-flex
;
height
:
100%
;
view
{
align-self
:
center
;
}
.arrowImg
{
margin-left
:
12rpx
;
width
:
17rpx
;
height
:
11rpx
;
background-size
:
cover
;
background-position
:
center
center
;
}
.font28
{
font-size
:
28rpx
;
}
.font40
{
font-size
:
40rpx
;
margin-left
:
15rpx
;
}
}
}
.scrollY
{
position
:
fixed
;
height
:
calc
(
100vh
-
178rpx
-
calc
(
44px
+
env
(
safe-area-inset-top
)));
bottom
:
0
;
left
:
0
;
right
:
0
;
}
.popup
{
position
:
fixed
;
bottom
:
0
;
left
:
0
;
right
:
0
;
}
.pannels
{
width
:
100%
;
background-color
:
white
;
display
:
flex
;
flex-direction
:
column
;
.item
{
margin-left
:
32rpx
;
width
:
calc
(
100%
-
32rpx
);
border-bottom
:
1px
solid
#E5E5E5
;
display
:
flex
;
flex-direction
:
column
;
.p1
{
margin-top
:
26rpx
;
margin-bottom
:
6rpx
;
width
:
calc
(
100%
-
40rpx
);
height
:
45rpx
;
line-height
:
45rpx
;
display
:
flex
;
justify-content
:
space-between
;
color
:
#333333
;
font-size
:
32rpx
;
padding-right
:
40rpx
;
.left
{
display
:
flex
;
view
{
align-self
:
center
;
}
.meal
{
width
:
80rpx
;
height
:
34rpx
;
line-height
:
34rpx
;
background
:
rgba
(
4
,
184
,
113
,
0
.09
);
border-radius
:
5rpx
;
font-size
:
24rpx
;
color
:
#04B871
;
margin-left
:
20rpx
;
text-align
:
center
;
}
}
}
.p2
{
width
:
calc
(
100%
-
40rpx
);
height
:
37rpx
;
font-size
:
26rpx
;
color
:
rgba
(
0
,
0
,
0
,
0
.35
);
line-height
:
37rpx
;
padding-right
:
40rpx
;
margin-bottom
:
24rpx
;
}
}
}
.bottomTip
{
margin-top
:
32rpx
;
padding-bottom
:
32rpx
;
width
:
100%
;
height
:
33rpx
;
font-size
:
24rpx
;
color
:
rgba
(
0
,
0
,
0
,
0
.25
);
line-height
:
33rpx
;
text-align
:
center
;
}
}
</
style
>
\ No newline at end of file
src/pages/ApplyConsumption/pendingOrder/pendingOrder.vue
0 → 100644
View file @
e6851784
<
template
>
<view
id=
"pendingOrderBox"
>
<van-tabs
color=
"#04B871"
@
click=
"changeTab"
title-inactive-color=
"#969799"
title-active-color=
"#323233"
>
<van-tab
title=
'待支付'
name=
"1"
>
</van-tab>
<van-tab
title=
'还款历史'
name=
"2"
>
</van-tab>
</van-tabs>
<view
class=
"dataBox"
:style=
"orderList.length==0?'background:#F1F1F3':''"
>
<view
class=
"orderList"
v-if=
'orderList.length>0'
>
<view
class=
"orderitem"
@
tap=
"getOrderDetai(item)"
v-for=
"(item,index) in orderList"
:key=
"index"
>
<view
class=
"rigth"
>
<view
class=
"storeName"
>
{{
item
.
storeName
||
''
}}
</view>
<view
class=
"mealType"
>
{{
mealType
[
item
.
mealType
]
||
''
}}
</view>
<view
class=
"amount"
>
{{
itemAmount
(
item
.
amount
||
0
)
}}
</view>
</view>
<view
class=
"datatime"
>
{{
item
.
dealTime
||
''
}}
</view>
</view>
</view>
<view
v-if=
'orderList.length==0'
class=
"noCostInfo"
>
<image
:src=
"ImgUrl+'xzf/noData-01.png'"
mode=
'widthFix'
/>
<p>
没有欠款订单~
</p>
</view>
</view>
<view
class=
"showall"
>
— 已展示全部数据 —
</view>
<view
class=
"answeringQuestion"
@
click=
"goToPage(1)"
v-if=
"activeTab==1"
>
为什么有待支付订单?
</view>
</view>
</
template
>
<
script
>
import
{
Dialog
,
Toast
}
from
'
vant
'
;
import
config
from
'
../common/config.js
'
import
{
requestGet
,
requestPost
}
from
'
../common/request.js
'
export
default
{
data
()
{
return
{
activeTab
:
1
,
// 1 还款 2 历史
orderList
:
[],
ImgUrl
:
this
.
$ImgUrl
,
mealType
:
{
1
:
'
早餐
'
,
2
:
'
中餐
'
,
3
:
'
晚餐
'
,
4
:
'
夜宵
'
,
5
:
'
夜夜宵
'
},
status
:
{
0
:
'
待扣款
'
,
1
:
'
已付款
'
,
2
:
'
已撤销
'
,
3
:
'
已退款
'
,
4
:
'
异常订单
'
}
}
},
onLoad
(
options
)
{
this
.
WaitPayList
(
this
.
activeTab
);
},
onShow
()
{},
methods
:
{
// 订单详情
async
getOrderDetai
(
item
)
{
try
{
uni
.
showLoading
({
title
:
"
请稍后
"
,
// #ifndef MP-ALIPAY
mask
:
true
,
// #endif
})
await
new
Promise
((
res
,
rej
)
=>
{
setTimeout
(()
=>
{
res
()
},
200
);
})
uni
.
hideLoading
()
uni
.
navigateTo
({
url
:
`../pendingOrderDetail/pendingOrderDetail?devflowNo=`
+
item
.
devflowNo
||
''
})
}
catch
(
error
)
{
uni
.
showToast
({
icon
:
"
error
"
,
title
:
error
.
message
})
}
},
// 跳转页面
async
goToPage
(
value
)
{
switch
(
value
)
{
case
1
:
uni
.
navigateTo
({
url
:
'
../OrderClearSuspicions/OrderClearSuspicions
'
})
break
;
case
2
:
break
;
case
3
:
break
;
default
:
break
;
}
},
// 待支付订单列表
async
WaitPayList
(
activeTab
)
{
uni
.
showLoading
({
title
:
"
请稍后
"
,
// #ifndef MP-ALIPAY
mask
:
true
,
// #endif
})
await
new
Promise
((
res
,
rej
)
=>
{
setTimeout
(()
=>
{
res
()
},
200
);
})
const
data
=
await
requestPost
(
'
/cgi-xpay/app/h5/WaitPayList
'
,
{
accountId
:
sessionStorage
.
getItem
(
'
accountId
'
)
*
1
,
status
:
activeTab
-
1
})
uni
.
hideLoading
()
if
(
data
[
'
code
'
]
!=
200
)
{
await
Dialog
({
title
:
'
温馨提示
'
,
message
:
data
[
'
message
'
],
confirmButtonText
:
"
知道了
"
})
return
}
this
.
orderList
=
data
.
data
[
'
orderList
'
]
||
[]
// this.orderList = Array(10).fill(1).map((v, index) => {
// return {
// accountId: index, // integer刷脸用户账户id,该id为绑定用户id
// amount: 100, // integer消费金额 单位分
// dealTime: '2023-08-09 08:02:01', // string消费时间
// debt: 1, // integer是否垫资 1支付宝垫资 0未垫资
// devflowNo: 'sdfasdfsdfsd', // string终端消费流水号
// mealType: 1, // integer餐别:1早餐,2中餐,3晚餐,4夜宵,5夜夜宵
// schoolName: '学校名称', // string学校名称
// status: 1, //integer订单状态 0待扣款 1已付款 2已撤销 3已退款 4异常订单
// storeName: '商家名称', // string商家名称
// userName: '用户姓名', // string用户姓名
// }
// })
},
changeTab
(
name
,
title
)
{
this
.
activeTab
=
name
;
this
.
WaitPayList
(
this
.
activeTab
);
},
},
computed
:
{
itemAmount
()
{
return
function
(
Amount
)
{
if
(
Amount
)
{
return
(
Amount
/
100
).
toFixed
(
2
)
}
else
{
return
"
0.00
"
}
}
},
},
onReachBottom
()
{},
//下拉刷新
onPullDownRefresh
()
{
this
.
WaitPayList
(
this
.
activeTab
);
uni
.
stopPullDownRefresh
()
},
}
</
script
>
<
style
lang=
"scss"
>
page
{
background
:
#F1F1F3
;
}
#pendingOrderBox
{
.orderList
{
padding-left
:
33rpx
;
}
.orderitem
{
height
:
135rpx
;
border-bottom
:
2rpx
solid
#E5E5E5
;
.rigth
{
display
:
flex
;
justify-items
:
center
;
align-items
:
center
;
padding-top
:
24rpx
;
position
:
relative
;
}
.storeName
{
height
:
45rpx
;
font-size
:
32rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#333333
;
line-height
:
45rpx
;
}
.mealType
{
width
:
80rpx
;
height
:
34rpx
;
background
:
rgba
(
4
,
184
,
113
,
0
.09
);
border-radius
:
5rpx
;
line-height
:
34rpx
;
text-align
:
center
;
margin-left
:
20rpx
;
font-size
:
24rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#04B871
;
}
.amount
{
position
:
absolute
;
height
:
45rpx
;
font-size
:
32rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#E02020
;
line-height
:
45rpx
;
right
:
40rpx
;
}
.datatime
{
height
:
37rpx
;
font-size
:
26rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
rgba
(
0
,
0
,
0
,
0
.35
);
line-height
:
37rpx
;
margin-top
:
6rpx
;
}
}
.dataBox
{
border-top
:
2rpx
solid
#F1F1F3
;
background
:
#FFFFFF
;
}
.answeringQuestion
{
height
:
45rpx
;
font-size
:
32rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#858585
;
line-height
:
45rpx
;
text-align
:
center
;
margin-top
:
30rpx
;
padding-bottom
:
50rpx
;
}
.showall
{
height
:
33rpx
;
font-size
:
24rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
rgba
(
0
,
0
,
0
,
0
.25
);
line-height
:
33rpx
;
text-align
:
center
;
margin-top
:
32rpx
;
}
.active
{
color
:
#01BC73
;
font-weight
:
bold
;
}
.noCostInfo
{
width
:
500rpx
;
margin
:
10vh
auto
;
text-align
:
center
;
color
:
#484C54
;
font-size
:
30rpx
;
image
{
width
:
500rpx
;
height
:
255rpx
;
margin-bottom
:
3vh
;
}
}
}
</
style
>
\ No newline at end of file
src/pages/ApplyConsumption/pendingOrderDetail/pendingOrderDetail.vue
0 → 100644
View file @
e6851784
<
template
>
<view
class=
"rechargeDetail"
>
<view
class=
"contentWrapper"
>
<view
class=
"wrapper"
>
<view
class=
"topBg"
:style=
"'background-image: url('+this.$ImgUrl + 'user/greyBgTop.png'+')'"
>
<view
class=
"line"
></view>
</view>
<view
class=
"title"
>
{{
orderInfo
[
'
storeName
'
]
||
''
}}
-
{{
mealType
[
orderInfo
[
'
mealType
'
]]
}}
</view>
<view
class=
"amount"
>
-
{{
itemAmount
(
orderInfo
[
'
amount
'
]
||
0
)
}}
</view>
<!-- 订单状态 -->
<view
class=
"status"
v-if=
"orderInfo['status']==0||orderInfo['status']==1"
>
{{
[
'
待支付
'
,
'
已支付
'
][
orderInfo
[
'
status
'
]]
}}
</view>
<view
class=
"rowItem"
style=
"margin-top: 92rpx;"
>
<view
class=
"label"
>
学生姓名
</view>
<view
class=
"value"
>
{{
orderInfo
[
'
userName
'
]
||
''
}}
</view>
</view>
<view
class=
"rowItem"
>
<view
class=
"label"
>
年级班级
</view>
<view
class=
"value"
>
{{
orderInfo
[
'
gradeName
'
]
||
''
}}
/
{{
orderInfo
[
'
className
'
]
||
''
}}
</view>
</view>
<view
class=
"rowItem"
>
<view
class=
"label"
>
手续费
</view>
<view
class=
"value"
>
{{
orderInfo
[
'
serviceFee
'
]
||
'
0.00
'
}}
</view>
</view>
<view
class=
"rowItem"
>
<view
class=
"label"
>
消费设备
</view>
<view
class=
"value"
>
{{
orderInfo
[
'
deviceName
'
]
||
''
}}
</view>
</view>
<view
class=
"rowItem"
>
<view
class=
"label"
>
消费场景
</view>
<view
class=
"value"
>
{{
orderInfo
[
'
consumeScene
'
]
||
''
}}
</view>
</view>
<view
class=
"rowItem"
>
<view
class=
"label"
>
消费时间
</view>
<view
class=
"value"
>
{{
orderInfo
[
'
dealTime
'
]
||
''
}}
</view>
</view>
<view
class=
"rowItem"
>
<view
class=
"label"
>
交易订单号
</view>
<view
class=
"value"
>
{{
orderInfo
[
'
platflowNo
'
]
||
''
}}
</view>
</view>
<view
class=
"btn"
@
click=
"goToPage(1)"
>
<view
class=
"button"
>
对此订单有疑问?
</view>
</view>
</view>
<view
class=
"bottomBg"
:style=
"'background-image: url('+this.$ImgUrl + 'user/greyBgBottom.png'+')'"
></view>
</view>
</view>
</
template
>
<
script
>
import
{
Dialog
,
Toast
}
from
'
vant
'
;
import
config
from
'
../common/config.js
'
import
{
requestGet
,
requestPost
}
from
'
../common/request.js
'
export
default
{
data
()
{
return
{
ImgUrl
:
this
.
$ImgUrl
,
mealType
:
{
1
:
'
早餐
'
,
2
:
'
中餐
'
,
3
:
'
晚餐
'
,
4
:
'
夜宵
'
,
5
:
'
夜夜宵
'
},
status
:
{
0
:
'
待扣款
'
,
1
:
'
已付款
'
,
2
:
'
已撤销
'
,
3
:
'
已退款
'
,
4
:
'
异常订单
'
},
orderInfo
:
{
accountId
:
''
,
// integer刷脸用户账户id,该id为绑定用户id
amount
:
''
,
// integer消费金额 单位分
dealTime
:
''
,
// string消费时间(刷脸时间)
debt
:
''
,
// integer是否垫资 1支付宝垫资 0未垫资
devflowNo
:
''
,
// string终端消费流水号
mealType
:
1
,
// integer餐别:1早餐,2中餐,3晚餐,4夜宵,5夜夜宵
payTime
:
''
,
// string支付时间
payType
:
''
,
// integer消费类型 1.刷卡 2.刷脸
platflowNo
:
''
,
// string平台交易流水(订单编号)
respMsg
:
''
,
// string响应描述 (欠款原因)
schoolName
:
''
,
// string学校名称
status
:
''
,
// integer订单状态 0待扣款 1已付款 2已撤销 3已退款 4异常订单
storeName
:
''
,
// string食堂档口名称
tradeNo
:
''
,
// string支付宝订单号(支付宝流水号)
userName
:
''
,
// string用户姓名
gradeName
:
''
,
//年级
className
:
''
,
//班级
serviceFee
:
''
,
//服务费(手续费) 格式0.02
deviceName
:
''
,
//消费设备
consumeScene
:
''
//消费场景
}
}
},
onLoad
(
options
)
{
this
.
OrderDetail
(
options
[
'
devflowNo
'
]
||
''
);
},
computed
:
{
itemAmount
()
{
return
function
(
Amount
)
{
if
(
Amount
)
{
return
(
Amount
/
100
).
toFixed
(
2
)
}
else
{
return
"
0.00
"
}
}
},
},
methods
:
{
// 订单详情
async
OrderDetail
(
devflowNo
)
{
const
data
=
await
requestPost
(
'
/cgi-xpay/app/h5/OrderDetail
'
,
{
devflowNo
})
if
(
data
[
'
code
'
]
!=
200
)
{
await
Dialog
({
title
:
'
温馨提示
'
,
message
:
data
[
'
message
'
],
confirmButtonText
:
"
知道了
"
})
return
}
this
.
orderInfo
=
data
.
data
[
'
data
'
]
||
{}
},
// 跳转页面
async
goToPage
(
value
)
{
switch
(
value
)
{
case
1
:
uni
.
makePhoneCall
({
phoneNumber
:
'
400-9656-210
'
})
break
;
case
2
:
break
;
case
3
:
break
;
default
:
break
;
}
},
}
}
</
script
>
<
style
lang=
"scss"
>
.rechargeDetail
{
width
:
100%
;
height
:
100%
;
min-height
:
100vh
;
background
:
#F1F1F3
;
.status
{
height
:
45rpx
;
font-size
:
32rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#FA6400
;
line-height
:
45rpx
;
text-align
:
center
;
}
.contentWrapper
{
padding
:
25rpx
22rpx
0
25rpx
;
display
:
flex
;
flex-direction
:
column
;
.wrapper
{
margin
:
0
8rpx
;
padding-top
:
59rpx
;
width
:
686rpx
;
display
:
flex
;
flex-direction
:
column
;
background
:
white
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
position
:
relative
;
.topBg
{
position
:
absolute
;
top
:
0
;
left
:
-8rpx
;
width
:
703rpx
;
height
:
59rpx
;
background-size
:
cover
;
background-position
:
center
center
;
z-index
:
1
;
.line
{
width
:
686rpx
;
height
:
22rpx
;
margin-top
:
9rpx
;
margin-left
:
8rpx
;
background
:
linear-gradient
(
180deg
,
#D9D9D9
0%
,
#FFFFFF
100%
);
opacity
:
0
.75
;
}
}
.title
{
margin-top
:
78rpx
;
width
:
100%
;
height
:
42rpx
;
font-size
:
30rpx
;
font-weight
:
400
;
color
:
#333333
;
line-height
:
42rpx
;
text-align
:
center
;
}
.amount
{
margin-top
:
4rpx
;
width
:
100%
;
height
:
90rpx
;
font-size
:
64rpx
;
color
:
#333333
;
font-weight
:
600
;
line-height
:
90rpx
;
text-align
:
center
;
}
.rowItem
{
padding
:
0
32rpx
;
margin-bottom
:
37rpx
;
display
:
inline-flex
;
justify-content
:
space-between
;
height
:
42rpx
;
line-height
:
42rpx
;
font-size
:
30rpx
;
color
:
#333333
;
.label
{
height
:
42rpx
;
font-size
:
30rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#333333
;
line-height
:
42rpx
;
}
.value
{
color
:
rgba
(
0
,
0
,
0
,
0
.5
);
}
}
.btn
{
padding
:
165rpx
0
35rpx
;
.button
{
margin
:
0
auto
;
width
:
622rpx
;
height
:
71rpx
;
line-height
:
71rpx
;
background
:
#F1F1F3
;
border-radius
:
12rpx
;
text-align
:
center
;
font-size
:
28rpx
;
color
:
rgba
(
0
,
0
,
0
,
0
.5
);
}
}
}
.bottomBg
{
width
:
686rpx
;
height
:
29rpx
;
background-size
:
cover
;
background-position
:
center
center
;
margin
:
0
8rpx
;
}
}
}
</
style
>
\ No newline at end of file
src/pages/ApplyConsumption/rechargeDetail/rechargeDetail.vue
0 → 100644
View file @
e6851784
<
template
>
<view
class=
"rechargeDetail"
>
<view
class=
"contentWrapper"
>
<view
class=
"wrapper"
>
<view
class=
"topBg"
:style=
"'background-image: url('+this.$ImgUrl + 'user/greyBgTop.png'+')'"
>
<view
class=
"line"
></view>
</view>
<view
class=
"title"
>
{{
Record
[
'
optionName
'
]
||
''
}}
</view>
<view
class=
"amount"
>
{{
itemAmount
(
Record
[
'
amount
'
]
||
0
)
}}
</view>
<view
class=
"rowItem"
style=
"margin-top: 92rpx;"
>
<view
class=
"label"
>
学生姓名
</view>
<view
class=
"value"
>
{{
Record
[
'
userName
'
]
||
''
}}
</view>
</view>
<view
class=
"rowItem"
>
<view
class=
"label"
>
年级班级
</view>
<view
class=
"value"
>
{{
Record
[
'
gradeName
'
]
||
''
}}
/
{{
Record
[
'
className
'
]
||
''
}}
</view>
</view>
<view
class=
"rowItem"
>
<view
class=
"label"
>
服务费
</view>
<view
class=
"value"
>
{{
Record
[
'
serviceFee
'
]
||
'
0.00
'
}}
</view>
</view>
<view
class=
"rowItem"
>
<view
class=
"label"
>
消费时间
</view>
<view
class=
"value"
>
{{
Record
[
'
payTime
'
]
||
''
}}
</view>
</view>
<view
class=
"rowItem"
>
<view
class=
"label"
>
交易订单号
</view>
<view
class=
"value"
>
{{
Record
[
'
outTradeNo
'
]
||
''
}}
</view>
</view>
<view
class=
"rowItem"
>
<view
class=
"label"
>
支付订单号
</view>
<view
class=
"value"
>
{{
Record
[
'
tradeNo
'
]
||
''
}}
</view>
</view>
<view
class=
"btn"
@
click=
"goToPage(1)"
>
<view
class=
"button"
>
对此订单有疑问?
</view>
</view>
</view>
<view
class=
"bottomBg"
:style=
"'background-image: url('+this.$ImgUrl + 'user/greyBgBottom.png'+')'"
></view>
</view>
</view>
</
template
>
<
script
>
import
{
Dialog
,
Toast
}
from
'
vant
'
;
import
config
from
'
../common/config.js
'
import
{
requestGet
,
requestPost
}
from
'
../common/request.js
'
export
default
{
data
()
{
return
{
ImgUrl
:
this
.
$ImgUrl
,
mealType
:
{
1
:
'
早餐
'
,
2
:
'
中餐
'
,
3
:
'
晚餐
'
,
4
:
'
夜宵
'
,
5
:
'
夜夜宵
'
},
status
:
{
0
:
'
待扣款
'
,
1
:
'
已付款
'
,
2
:
'
已撤销
'
,
3
:
'
已退款
'
,
4
:
'
异常订单
'
},
Record
:
uni
.
getStorageSync
(
'
rechargeDetail
'
)
}
},
onLoad
(
options
)
{},
onUnload
:
function
()
{
uni
.
removeStorageSync
(
'
rechargeDetail
'
)
},
computed
:
{
itemAmount
()
{
return
function
(
Amount
)
{
if
(
Amount
)
{
return
(
Amount
/
100
).
toFixed
(
2
)
}
else
{
return
"
0.00
"
}
}
},
},
methods
:
{
// 跳转页面
async
goToPage
(
value
)
{
switch
(
value
)
{
case
1
:
uni
.
makePhoneCall
({
phoneNumber
:
'
400-9656-210
'
})
break
;
case
2
:
break
;
case
3
:
break
;
default
:
break
;
}
},
}
}
</
script
>
<
style
lang=
"scss"
>
.rechargeDetail
{
width
:
100%
;
height
:
100%
;
min-height
:
100vh
;
background
:
#F1F1F3
;
.status
{
height
:
45rpx
;
font-size
:
32rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#FA6400
;
line-height
:
45rpx
;
text-align
:
center
;
}
.contentWrapper
{
padding
:
25rpx
22rpx
0
25rpx
;
display
:
flex
;
flex-direction
:
column
;
.wrapper
{
margin
:
0
8rpx
;
padding-top
:
59rpx
;
width
:
686rpx
;
display
:
flex
;
flex-direction
:
column
;
background
:
white
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
position
:
relative
;
.topBg
{
position
:
absolute
;
top
:
0
;
left
:
-8rpx
;
width
:
703rpx
;
height
:
59rpx
;
background-size
:
cover
;
background-position
:
center
center
;
z-index
:
1
;
.line
{
width
:
686rpx
;
height
:
22rpx
;
margin-top
:
9rpx
;
margin-left
:
8rpx
;
background
:
linear-gradient
(
180deg
,
#D9D9D9
0%
,
#FFFFFF
100%
);
opacity
:
0
.75
;
}
}
.title
{
margin-top
:
78rpx
;
width
:
100%
;
height
:
42rpx
;
font-size
:
30rpx
;
font-weight
:
400
;
color
:
#333333
;
line-height
:
42rpx
;
text-align
:
center
;
}
.amount
{
margin-top
:
4rpx
;
width
:
100%
;
height
:
90rpx
;
font-size
:
64rpx
;
color
:
#333333
;
font-weight
:
600
;
line-height
:
90rpx
;
text-align
:
center
;
}
.rowItem
{
padding
:
0
32rpx
;
margin-bottom
:
37rpx
;
display
:
inline-flex
;
justify-content
:
space-between
;
height
:
42rpx
;
line-height
:
42rpx
;
font-size
:
30rpx
;
color
:
#333333
;
.label
{
height
:
42rpx
;
font-size
:
30rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#333333
;
line-height
:
42rpx
;
}
.value
{
color
:
rgba
(
0
,
0
,
0
,
0
.5
);
}
}
.btn
{
padding
:
165rpx
0
35rpx
;
.button
{
margin
:
0
auto
;
width
:
622rpx
;
height
:
71rpx
;
line-height
:
71rpx
;
background
:
#F1F1F3
;
border-radius
:
12rpx
;
text-align
:
center
;
font-size
:
28rpx
;
color
:
rgba
(
0
,
0
,
0
,
0
.5
);
}
}
}
.bottomBg
{
width
:
686rpx
;
height
:
29rpx
;
background-size
:
cover
;
background-position
:
center
center
;
margin
:
0
8rpx
;
}
}
}
</
style
>
\ No newline at end of file
src/pages/ApplyConsumption/topupDetail/topupDetail.vue
0 → 100644
View file @
e6851784
<
template
>
<view
class=
"topupDetail"
>
<view
class=
"firstLine"
>
<view
class=
"left"
@
click=
"show = true"
>
<view>
{{
currentDate
}}
</view>
<view
class=
"arrowImg"
:style=
"'background-image: url('+ImgUrl + 'user/arrowDown.png'+')'"
></view>
</view>
<view
class=
"right"
>
<view
class=
"font28"
>
¥
</view>
<view
class=
"font40"
>
{{
itemAmount
(
expenditure
||
0
)
}}
</view>
</view>
</view>
<scroll-view
scroll-y=
"true"
class=
"scrollY"
>
<view
class=
"pannels"
v-if=
"list.length>0"
>
<view
class=
"item"
v-for=
"(item,index) in list"
:key=
"index"
@
tap=
"rechargeRecordDetai(item)"
>
<view
class=
"p1"
>
<view>
{{
item
.
optionName
||
''
}}
</view>
<view
class=
"num"
>
{{
itemAmount
(
item
.
amount
||
0
)
}}
</view>
</view>
<view
class=
"p2"
>
{{
itemTimeFormat
(
item
.
payTime
)
}}
</view>
</view>
</view>
<view
v-if=
'list.length==0'
class=
"noCostInfo"
>
<image
:src=
"ImgUrl+'xzf/noData-01.png'"
mode=
'widthFix'
/>
<p>
没有更多数据~
</p>
</view>
<view
class=
"bottomTip"
v-if=
"list.length>0"
>
— 已展示全部数据 —
</view>
</scroll-view>
<view
class=
"popup"
v-if=
"show"
>
<van-datetime-picker
:value=
"currentDate"
type=
"year-month"
title=
"选择年月"
:min-date=
"minDate"
position=
"bottom"
:max-date=
"maxDate"
:formatter=
"formatter"
@
confirm=
"onConfirm"
@
cancel=
"onCancel"
/>
</view>
<view
class=
"answeringQuestion"
@
click=
"goToPage(1)"
>
为什么有待支付订单?
</view>
</view>
</
template
>
<
script
>
import
moment
from
"
moment
"
;
import
{
Dialog
,
Toast
}
from
'
vant
'
;
import
config
from
'
../common/config.js
'
import
{
requestGet
,
requestPost
}
from
'
../common/request.js
'
import
{
DatetimePicker
}
from
'
vant
'
;
export
default
{
data
()
{
return
{
ImgUrl
:
this
.
$ImgUrl
,
minDate
:
new
Date
(
2022
,
10
,
0
),
maxDate
:
new
Date
(
2999
,
10
,
1
),
currentDate
:
''
,
currentDate_
:
''
,
show
:
false
,
list
:
[],
// 支出 单位分
expenditure
:
0
,
// 收入 单位分
revenue
:
0
}
},
onLoad
(
options
)
{
this
.
currentDate
=
moment
(
new
Date
()).
format
(
'
YYYY年M月
'
);
this
.
currentDate_
=
moment
(
new
Date
()).
format
(
'
YYYY-MM
'
);
this
.
QueryRechargeRecord
();
},
computed
:
{
itemAmount
()
{
return
function
(
Amount
)
{
if
(
Amount
)
{
return
(
Amount
/
100
).
toFixed
(
2
)
}
else
{
return
"
0.00
"
}
}
},
itemTimeFormat
()
{
return
function
(
time
)
{
if
(
time
)
{
return
moment
(
time
).
format
(
'
MM-DD HH:mm:ss
'
)
}
else
{
return
time
}
}
},
},
methods
:
{
// 充值详情
async
rechargeRecordDetai
(
item
)
{
try
{
uni
.
showLoading
({
title
:
"
请稍后
"
,
// #ifndef MP-ALIPAY
mask
:
true
,
// #endif
})
await
new
Promise
((
res
,
rej
)
=>
{
setTimeout
(()
=>
{
res
()
},
200
);
})
uni
.
setStorageSync
(
'
rechargeDetail
'
,
item
)
uni
.
hideLoading
()
uni
.
navigateTo
({
url
:
`../rechargeDetail/rechargeDetail`
})
}
catch
(
error
)
{
uni
.
showToast
({
icon
:
"
error
"
,
title
:
error
.
message
})
}
},
// 跳转页面
async
goToPage
(
value
)
{
switch
(
value
)
{
case
1
:
uni
.
navigateTo
({
url
:
'
../OrderClearSuspicions/OrderClearSuspicions
'
})
break
;
case
2
:
break
;
case
3
:
break
;
default
:
break
;
}
},
// 充值明细列表
async
QueryRechargeRecord
()
{
uni
.
showLoading
({
title
:
"
请稍后
"
,
// #ifndef MP-ALIPAY
mask
:
true
,
// #endif
})
await
new
Promise
((
res
,
rej
)
=>
{
setTimeout
(()
=>
{
res
()
},
200
);
})
const
data
=
await
requestPost
(
'
/cgi-xpay/app/h5/QueryRechargeRecord
'
,
{
accountId
:
sessionStorage
.
getItem
(
'
accountId
'
)
*
1
,
month
:
this
.
currentDate_
})
uni
.
hideLoading
()
if
(
data
[
'
code
'
]
!=
200
)
{
await
Dialog
({
title
:
'
温馨提示
'
,
message
:
data
[
'
message
'
],
confirmButtonText
:
"
知道了
"
})
return
}
// amount integer金额 单位分 有正负值
// balance integer余额 单位分
// id integer
// recordName string记录名称
// recordTime string操作时间
this
.
list
=
data
.
data
[
'
list
'
]
||
[]
this
.
expenditure
=
data
.
data
[
'
expenditure
'
]
||
0
// this.list = Array(10).fill(1).map((v, index) => {
// return {
// amount: 100, // integer金额 单位分
// className: '班级', // string班级
// gradeName: '年级', // string年级
// id: index + 1, // integer
// optionName: '线上充值', // string操作名称 示例:线上充值
// outTradeNo: '易订单号', // string交易订单号
// payTime: '2023-09-10 08:22:56', // string消费时间
// serviceFee: '0.02', // string服务费 格式¥0.02
// tradeNo: 'd3456345', // string支付订单号
// }
// })
},
formatter
(
type
,
val
)
{
if
(
type
===
'
year
'
)
{
return
`
${
val
}
年`
;
}
else
if
(
type
===
'
month
'
)
{
return
`
${
val
}
月`
;
}
return
val
;
},
onConfirm
(
val
)
{
this
.
currentDate
=
moment
(
val
).
format
(
'
YYYY年M月
'
)
this
.
currentDate_
=
moment
(
val
).
format
(
'
YYYY-MM
'
);
this
.
show
=
false
this
.
QueryRechargeRecord
()
},
onCancel
()
{
this
.
show
=
false
}
}
}
</
script
>
<
style
lang=
"scss"
>
.topupDetail
{
width
:
100%
;
height
:
100%
;
min-height
:
100vh
;
background
:
#F1F1F3
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
.noCostInfo
{
width
:
500rpx
;
margin
:
10vh
auto
;
text-align
:
center
;
color
:
#484C54
;
font-size
:
30rpx
;
image
{
width
:
500rpx
;
height
:
255rpx
;
margin-bottom
:
3vh
;
}
}
.answeringQuestion
{
height
:
45rpx
;
font-size
:
32rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#858585
;
line-height
:
45rpx
;
text-align
:
center
;
margin-top
:
30rpx
;
padding-bottom
:
50rpx
;
}
.firstLine
{
display
:
inline-flex
;
justify-content
:
space-between
;
height
:
88rpx
;
line-height
:
88rpx
;
width
:
calc
(
100%
-
130rpx
);
padding
:
0
38rpx
0
92rpx
;
background
:
#FFFFFF
;
border-top
:
1rpx
solid
#E5E5E5
;
border-bottom
:
1rpx
solid
#E5E5E5
;
font-size
:
30rpx
;
color
:
#333333
;
.left
,
.right
{
display
:
inline-flex
;
height
:
100%
;
view
{
align-self
:
center
;
}
.arrowImg
{
margin-left
:
12rpx
;
width
:
17rpx
;
height
:
11rpx
;
background-size
:
cover
;
background-position
:
center
center
;
}
.font28
{
font-size
:
28rpx
;
}
.font40
{
font-size
:
40rpx
;
margin-left
:
15rpx
;
}
}
}
.scrollY
{
// position: fixed;
// height: calc(100vh - 91rpx - calc(44px + env(safe-area-inset-top)));
// bottom: 0;
// left: 0;
// right: 0;
}
.popup
{
position
:
fixed
;
bottom
:
0
;
left
:
0
;
right
:
0
;
}
.pannels
{
width
:
100%
;
background-color
:
white
;
display
:
flex
;
flex-direction
:
column
;
.item
{
margin-left
:
32rpx
;
width
:
calc
(
100%
-
32rpx
);
border-bottom
:
1px
solid
#E5E5E5
;
display
:
flex
;
flex-direction
:
column
;
.p1
{
margin-top
:
26rpx
;
margin-bottom
:
6rpx
;
width
:
calc
(
100%
-
40rpx
);
height
:
45rpx
;
line-height
:
45rpx
;
display
:
flex
;
justify-content
:
space-between
;
color
:
#333333
;
font-size
:
32rpx
;
padding-right
:
40rpx
;
.num
{
color
:
#E02020
;
}
}
.p2
{
width
:
calc
(
100%
-
40rpx
);
height
:
37rpx
;
font-size
:
26rpx
;
color
:
rgba
(
0
,
0
,
0
,
0
.35
);
line-height
:
37rpx
;
padding-right
:
40rpx
;
margin-bottom
:
24rpx
;
}
}
}
.bottomTip
{
margin-top
:
32rpx
;
padding-bottom
:
32rpx
;
width
:
100%
;
height
:
33rpx
;
font-size
:
24rpx
;
color
:
rgba
(
0
,
0
,
0
,
0
.25
);
line-height
:
33rpx
;
text-align
:
center
;
}
}
</
style
>
\ No newline at end of file
src/static/images/choice.png
0 → 100644
View file @
e6851784
2.6 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