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
de553b2a
Commit
de553b2a
authored
Jul 17, 2023
by
lizhishu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.新增消费应用;
parent
6494395c
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
2260 additions
and
2 deletions
+2260
-2
src/manifest.json
src/manifest.json
+10
-2
src/pages.json
src/pages.json
+45
-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
+464
-0
src/pages/ApplyConsumption/ConsumptionQuota/ConsumptionQuota.vue
...es/ApplyConsumption/ConsumptionQuota/ConsumptionQuota.vue
+873
-0
src/pages/ApplyConsumption/Home/Home.vue
src/pages/ApplyConsumption/Home/Home.vue
+467
-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
+30
-0
src/pages/ApplyConsumption/common/request.js
src/pages/ApplyConsumption/common/request.js
+62
-0
No files found.
src/manifest.json
View file @
de553b2a
...
@@ -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 @
de553b2a
...
@@ -488,6 +488,51 @@
...
@@ -488,6 +488,51 @@
}
}
}
}
,{
"path"
:
"pages/ApplyConsumption/Home/Home"
,
"style"
:
{
"navigationBarTitleText"
:
"校园消费"
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/ApplyConsumption/CommonProblem/CommonProblem"
,
"style"
:
{
"navigationBarTitleText"
:
"常见问题"
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/ApplyConsumption/ConsumptIoninfo/ConsumptIoninfo"
,
"style"
:
{
"navigationBarTitleText"
:
"消费记录"
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/ApplyConsumption/ConsumptionQuota/ConsumptionQuota"
,
"style"
:
{
"navigationBarTitleText"
:
"消费限额"
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"pages/ApplyConsumption/OrderClearSuspicions/OrderClearSuspicions"
,
"style"
:
{
"navigationBarTitleText"
:
"待还款订单"
,
"enablePullDownRefresh"
:
false
}
}
],
],
"globalStyle"
:
{
"globalStyle"
:
{
"navigationBarTextStyle"
:
"black"
,
"navigationBarTextStyle"
:
"black"
,
...
...
src/pages/ApplyConsumption/CommonProblem/CommonProblem.vue
0 → 100644
View file @
de553b2a
<
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 @
de553b2a
<
template
>
<view
class=
"ConsumptIoninfo container"
>
<view
class=
"nav"
>
<view
class=
"nav-list"
v-for=
"(item,index) in list"
:key=
"item.id"
@
tap=
"changeAct(item,index)"
>
<view
:class=
"[act==index?'name':'']"
>
{{
item
.
name
}}
</view>
<view
:class=
"[act==index?'line':'']"
>
</view>
</view>
</view>
<view
class=
""
style=
"border-bottom: 1rpx solid #E5E5E5;height: 1rpx;margin-top: 1rpx;"
></view>
<!-- 条件选择 -->
<view
class=
"condition"
>
<view
class=
"coll"
style=
"margin-left: 57rpx;"
>
<picker
mode=
"date"
:value=
"date"
fields=
"month"
:start=
"startDate"
:end=
"endDate"
@
change=
"bindDateChange"
>
<view
class=
""
style=
"display: flex;align-items: center;"
>
<text
class=
"lable"
>
{{
query
.
datatime
||
date
}}
</text>
<image
class=
"datachoice"
:src=
"ImgUrl2+'down.png'"
mode=
"aspectFit"
></image>
</view>
</picker>
</view>
<view
class=
"coll rightInfo"
style=
"margin-left: 139rpx;"
>
<text
class=
"money"
style=
"font-size: 40rpx;"
>
{{
totalAmount
}}
</text>
</view>
</view>
<!-- 内容的改变 -->
<view
class=
"content"
>
<view
class=
"orderList"
v-if=
"orderList.length>0"
>
<view
class=
"orderitem"
v-for=
"(item,index) in orderList"
:key=
"index"
@
tap=
"getOrderDetai(item)"
>
<view
class=
"row rowlin1"
>
<view
class=
"left name"
>
{{
item
.
storeName
}}
</view>
<view
class=
"right money"
>
{{
item
.
amount
}}
</view>
</view>
<view
class=
"row rowlin2"
>
<view
class=
"left schoolname"
>
{{
item
.
userName
}}
(
{{
item
.
schoolName
}}
)
</view>
<view
class=
"right paystatus"
:style=
"
{ 'color':['#FA6400'][item.status]||item.debt==1?'#FA6400':'' }">
<text
v-if=
"item.debt"
>
<text
v-if=
"item.status==3"
>
支付宝垫资,已退款
</text>
<text
v-else
>
支付宝垫资,待支付
</text>
</text>
<text
v-else
>
{{
orderStatus
[
item
.
status
]
}}
</text>
</view>
</view>
<view
class=
"row rowlin3"
>
<text
class=
"left paytime"
>
{{
item
.
dealTime
}}
</text>
</view>
</view>
<!-- -->
<view
class=
"listover"
>
— 已展示全部数据 —
</view>
</view>
<!-- 没有数据 -->
<view
class=
"nodata"
v-else
>
<image
:src=
"ImgUrl2+'nodata.png'"
mode=
"aspectFit"
></image>
<view>
无明细数据
</view>
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
name
:
"
ConsumptIoninfo
"
,
data
()
{
const
currentDate
=
this
.
getDate
()
return
{
ImgUrl2
:
this
.
$ImgUrl
+
'
xzfalipay/
'
,
ImgUrl
:
this
.
$ImgUrl
+
'
/static/weapp/
'
,
// 默认激活样式是第一个
act
:
0
,
list
:
[{
value
:
-
1
,
name
:
'
全部
'
},
{
value
:
1
,
name
:
'
已付款
'
},
{
value
:
3
,
name
:
'
已退款
'
},
{
value
:
0
,
name
:
'
待支付
'
}
],
orderList
:
[],
totalAmount
:
0
,
orderStatus
:
{
"
-1
"
:
"
全部
"
,
"
0
"
:
"
已欠费,待支付
"
,
"
1
"
:
"
已付款
"
,
"
2
"
:
"
已撤销
"
,
"
3
"
:
"
已退款
"
,
"
4
"
:
"
异常订单
"
},
content
:
''
,
userList
:
[],
userIndex
:
0
,
date
:
currentDate
,
// 选择的数据
query
:
{
user
:
""
,
datatime
:
""
,
accountId
:
0
,
month
:
this
.
getDate
({}),
status
:
-
1
}
}
},
onShow
()
{
// 页面默认显示的是list列表中第一条数据
this
.
content
=
this
.
list
[
0
]
},
computed
:
{
startDate
()
{
return
this
.
getDate
(
'
start
'
);
},
endDate
()
{
return
this
.
getDate
(
'
end
'
);
}
},
onLoad
:
function
(
options
)
{
console
.
log
(
options
);
console
.
log
(
this
.
query
);
// this.getOrderList()
this
.
userList
=
[{
"
userName
"
:
"
全部用户
"
,
"
id
"
:
0
}].
concat
(
this
.
userList
)
},
methods
:
{
// nav
async
changeAct
(
item
,
index
)
{
// 激活样式是当前点击的对应下标--list中对应id
this
.
act
=
index
;
// 可以根据点击事件改变内容
this
.
content
=
this
.
list
[
index
]
this
.
query
.
status
=
this
.
list
[
index
].
value
// this.getOrderList()
},
// 获取订单列表
async
getOrderList
()
{
try
{
uni
.
showLoading
({
title
:
"
请稍后
"
,
// #ifndef MP-ALIPAY
mask
:
true
,
// #endif
})
let
respes
=
await
this
.
$httpWX
.
post
({
url
:
'
/cgi-xpay/app/user/OrderList
'
},
this
.
query
)
if
(
respes
.
code
!=
200
)
{
uni
.
showToast
({
icon
:
"
none
"
,
// #ifndef MP-ALIPAY
mask
:
true
,
// #endif
title
:
respes
.
message
})
return
}
uni
.
hideLoading
()
if
(
respes
.
data
&&
respes
.
data
.
orderList
)
{
let
tmp
=
[]
for
(
let
s
of
respes
.
data
.
orderList
)
{
s
.
amount
=
(
s
.
amount
/
100
).
toFixed
(
2
)
tmp
.
push
(
s
)
}
this
.
orderList
=
tmp
this
.
totalAmount
=
(
respes
.
data
.
totalAmount
/
100
).
toFixed
(
2
)
}
else
{
this
.
orderList
=
[]
}
}
catch
(
error
)
{
uni
.
showToast
({
icon
:
"
error
"
,
title
:
error
.
message
})
}
},
// 订单详情
async
getOrderDetai
(
item
)
{
try
{
uni
.
showLoading
({
title
:
"
请稍后
"
,
// #ifndef MP-ALIPAY
mask
:
true
,
// #endif
})
await
new
Promise
((
res
,
rej
)
=>
{
setTimeout
(()
=>
{
res
()
},
1000
);
})
uni
.
hideLoading
()
uni
.
navigateTo
({
url
:
`../OrderDetai/OrderDetai?devflowNo=
${
item
.
devflowNo
}
`
})
}
catch
(
error
)
{
uni
.
showToast
({
icon
:
"
error
"
,
title
:
error
.
message
})
}
},
// 下拉选择器
async
bindPickerChange
(
e
)
{
console
.
log
(
'
picker发送选择改变,携带值为
'
,
e
.
detail
.
value
)
this
.
index
=
e
.
detail
.
value
this
.
query
.
user
=
this
.
userList
[
this
.
index
].
userName
this
.
query
.
accountId
=
this
.
userList
[
this
.
index
].
id
this
.
getOrderList
()
},
bindDateChange
:
function
(
e
)
{
if
(
e
.
detail
.
value
)
{
let
str
=
e
.
detail
.
value
.
split
(
"
-
"
)
this
.
date
=
str
[
0
]
+
"
年
"
+
str
[
1
]
+
"
月
"
this
.
query
.
datatime
=
str
[
0
]
+
"
年
"
+
str
[
1
]
+
"
月
"
this
.
query
.
month
=
e
.
detail
.
value
this
.
getOrderList
()
}
},
getDate
(
type
)
{
const
date
=
new
Date
();
let
year
=
date
.
getFullYear
();
let
month
=
date
.
getMonth
()
+
1
;
let
day
=
date
.
getDate
();
if
(
type
===
'
start
'
)
{
year
=
year
;
}
else
if
(
type
===
'
end
'
)
{
year
=
year
;
}
month
=
month
>
9
?
month
:
'
0
'
+
month
;
day
=
day
>
9
?
day
:
'
0
'
+
day
;
if
(
type
instanceof
Object
)
{
return
`
${
year
}
-
${
month
}
`
;
}
return
`
${
year
}
年
${
month
}
月`
;
}
}
}
</
script
>
<
style
lang=
"scss"
>
page
{
background-color
:
#FFFEFF
;
height
:
100%
;
}
.orderList
{
width
:
725rpx
;
float
:
right
;
padding-bottom
:
126rpx
;
.orderitem
{
height
:
172rpx
;
background-color
:
#FFFEFF
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
border-bottom
:
1rpx
solid
#E5E5E5
;
display
:
flex
;
flex-direction
:
column
;
.row
{
display
:
flex
;
align-items
:
center
;
}
.rowlin1
{
margin-top
:
23rpx
;
justify-content
:
space-between
;
padding-right
:
24rpx
;
}
.rowlin2
{
margin-top
:
6rpx
;
justify-content
:
space-between
;
padding-right
:
24rpx
;
}
.rowlin3
{
margin-top
:
2rpx
;
}
.name
{
height
:
45rpx
;
font-size
:
32rpx
;
font-weight
:
400
;
color
:
#333333
;
line-height
:
45rpx
;
}
.money
{
height
:
45rpx
;
font-size
:
32rpx
;
font-weight
:
400
;
color
:
#333333
;
line-height
:
45rpx
;
}
.schoolname
{
height
:
37rpx
;
font-size
:
26rpx
;
font-weight
:
400
;
color
:
#CCCCCC
;
line-height
:
37rpx
;
}
.paystatus
{
height
:
37rpx
;
font-size
:
26rpx
;
font-weight
:
400
;
line-height
:
37rpx
;
color
:
#CCCCCC
;
}
.paytime
{
height
:
37rpx
;
font-size
:
26rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#CCCCCC
;
line-height
:
37rpx
;
}
}
.listover
{
// width: 252rpx;
height
:
37rpx
;
font-size
:
26rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#CCCCCC
;
line-height
:
37rpx
;
text-align
:
center
;
margin-top
:
30rpx
;
}
}
.nodata
{
text-align
:
center
;
margin-top
:
169rpx
;
image
{
width
:
500rpx
;
height
:
254rpx
;
position
:
relative
;
}
view
{
height
:
40rpx
;
font-size
:
28rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#666666
;
line-height
:
40rpx
;
}
}
.nav
{
height
:
84rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-around
;
background-color
:
#FFFFFF
;
font-size
:
34rpx
;
color
:
#969799
;
}
.nav-list
{
height
:
100%
;
line-height
:
78rpx
;
}
.nav-list
.name
{
color
:
#323233
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-weight
:
500
;
}
.nav-list
.line
{
// margin-top: 10rpx;
width
:
68rpx
;
height
:
8rpx
;
background-color
:
#04B871
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-weight
:
500
;
margin
:
0
auto
;
// #ifdef APP
height
:
8rpx
!
important
;
// #endif
border-radius
:
4rpx
}
.condition
{
height
:
136rpx
;
width
:
100%
;
line-height
:
136rpx
;
display
:
flex
;
justify-content
:
space-around
;
align-items
:
center
;
border-bottom
:
1rpx
solid
#E5E5E5
;
.coll
{
display
:
flex
;
align-items
:
center
;
image
{
left
:
12rpx
;
}
.lable
{
height
:
42rpx
;
font-size
:
30rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#333333
;
line-height
:
42rpx
;
cursor
:
pointer
;
}
}
.rightInfo
{
height
:
56rpx
;
font-size
:
28rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#333333
;
line-height
:
40rpx
;
.
money
:
:
before
{
content
:
'¥'
;
position
:
relative
;
font-size
:
28rpx
;
padding-right
:
12rpx
;
}
}
image
{
width
:
17rpx
;
height
:
10rpx
;
position
:
relative
;
}
}
</
style
>
\ No newline at end of file
src/pages/ApplyConsumption/ConsumptionQuota/ConsumptionQuota.vue
0 → 100644
View file @
de553b2a
<
template
>
<view
class=
"ConsumptionQuota container"
>
<!-- 自定义消费限额开关 -->
<view
class=
"customSwitch"
v-if=
"schoolConsumeLimit.parentConsumeLimit == 1"
>
<view
class=
"itemInfo"
>
<view
class=
""
>
<text
class=
"name"
>
自定义消费限额
</text>
</view>
<view
class=
"value"
>
<switch
color=
"#04B871"
:checked=
"parentConsumeLimit.switch"
@
change=
"switchChange"
v-model=
"parentConsumeLimit.switch"
/>
</view>
</view>
</view>
<!-- 消费限额设置 -->
<view
class=
"ConsumptionSetting"
>
<!-- 默认消费限额 -->
<view
class=
"SchoolSetting"
>
<view
class=
"lable"
>
<text>
{{
parentConsumeLimit
.
switch
&&
schoolConsumeLimit
.
parentConsumeLimit
==
1
?
'
自定义
'
:
'
默认
'
}}
消费限额
</text>
</view>
<view
class=
"itembox"
>
<view
class=
"itemInfo"
>
<view
class=
""
>
<text
class=
"name"
>
单笔限额
</text>
</view>
<view
class=
"value"
v-if=
"parentConsumeLimit.switch && schoolConsumeLimit.parentConsumeLimit == 1"
>
<input
type=
"digit"
@
blur=
"handleInput_0"
v-model=
"parentConsumeLimit.singleLimit"
placeholder=
"请输入金额"
placeholder-class=
"placeholders"
/>
<view>
元
</view>
</view>
<view
class=
"value"
v-else
>
<text>
{{
schoolConsumeLimit
.
singleLimit
}}
元
</text>
</view>
</view>
<view
style=
"height: 1rpx;background: #EEEEEE;"
>
</view>
<view
class=
"itemInfo"
>
<view
class=
""
>
<text
class=
"name"
>
单日限额
</text>
</view>
<view
class=
"value"
v-if=
"parentConsumeLimit.switch && schoolConsumeLimit.parentConsumeLimit == 1"
>
<input
type=
"digit"
@
blur=
"handleInput_1"
v-model=
"parentConsumeLimit.dailyLimit"
placeholder=
"请输入金额"
placeholder-class=
"placeholders"
/>
<view>
元
</view>
</view>
<view
class=
"value"
v-else
>
<text>
{{
schoolConsumeLimit
.
dailyLimit
}}
元
</text>
</view>
</view>
<view
style=
"height: 1rpx;background: #EEEEEE;"
>
</view>
</view>
</view>
<view
class=
"senceTip"
v-if=
"parentConsumeLimit.switch && schoolConsumeLimit.parentConsumeLimit == 1"
>
<image
class=
"sumTip"
:src=
"ImgUrl2+'sumTip.png'"
mode=
"aspectFit"
></image>
所有场景实际消费之和不高于单日限额
</view>
<!-- 默认场景限额 -->
<view
class=
"ParentSetting"
>
<view
class=
"lable"
>
<text>
{{
parentConsumeLimit
.
switch
&&
schoolConsumeLimit
.
parentConsumeLimit
==
1
?
'
自定义
'
:
'
默认
'
}}
场景限额
</text>
<text
class=
"grey"
v-if=
"parentConsumeLimit.switch && schoolConsumeLimit.parentConsumeLimit == 1 "
>
每个场景限额不高于
{{
parentConsumeLimit
.
dailyLimit
}}
元
</text>
</view>
<view
class=
"Settings"
>
<view
class=
"itembox"
>
<view
class=
"itemInfo"
>
<text
class=
"cantTip"
v-if=
"parentConsumeLimit.switch && canteenTip && schoolConsumeLimit.parentConsumeLimit == 1"
>
限额0元,将无法在食堂消费
</text>
<view
style=
"position: relative;"
>
<text
class=
"name"
>
食堂
</text>
</view>
<view
class=
"value"
style=
"display: flex;align-items: center;"
v-if=
"parentConsumeLimit.switch && schoolConsumeLimit.parentConsumeLimit == 1"
>
<input
type=
"digit"
@
blur=
"handleInput"
v-model=
"parentConsumeLimit.canteenConsumptionLimit"
placeholder=
"请输入0 ~150之间整数"
placeholder-class=
"placeholders"
/>
<view>
元
</view>
</view>
<view
class=
"value"
style=
"display: flex;align-items: center;"
v-else
>
<view>
{{
schoolConsumeLimit
.
canteenConsumptionLimit
}}
元
</view>
</view>
</view>
<view
style=
"height: 1rpx;background: #EEEEEE;"
>
</view>
<view
class=
"itemInfo"
>
<text
class=
"cantTip"
v-if=
"parentConsumeLimit.switch && superTip && schoolConsumeLimit.parentConsumeLimit == 1"
>
限额0元,将无法在超市消费
</text>
<view
class=
""
>
<text
class=
"name"
>
超市
</text>
</view>
<view
class=
"value"
style=
"display: flex;align-items: center;"
v-if=
"parentConsumeLimit.switch && schoolConsumeLimit.parentConsumeLimit == 1"
>
<input
type=
"digit"
@
blur=
"handleInput2"
v-model=
"parentConsumeLimit.supermarketConsumptionLimit"
placeholder=
"请输入0 ~150之间整数"
placeholder-class=
"placeholders"
/>
<view>
元
</view>
</view>
<view
class=
"value"
style=
"display: flex;align-items: center;"
v-else
>
<view>
{{
schoolConsumeLimit
.
supermarketConsumptionLimit
}}
元
</view>
</view>
</view>
<view
style=
"height: 1rpx;background: #EEEEEE;"
>
</view>
<view
class=
"itemInfo"
>
<text
class=
"cantTip"
v-if=
"parentConsumeLimit.switch && otherTip && schoolConsumeLimit.parentConsumeLimit == 1"
>
限额0元,将无法在其他场景消费
</text>
<view
class=
""
>
<text
class=
"name"
>
其他
</text>
</view>
<view
class=
"value"
style=
"display: flex;align-items: center;"
v-if=
"parentConsumeLimit.switch && schoolConsumeLimit.parentConsumeLimit == 1"
>
<input
type=
"digit"
@
blur=
"handleInput3"
v-model=
"parentConsumeLimit.otherConsumptionLimit"
placeholder=
"请输入0 ~150之间整数"
placeholder-class=
"placeholders"
/>
<view>
元
</view>
</view>
<view
class=
"value"
style=
"display: flex;align-items: center;"
v-else
>
<view>
{{
schoolConsumeLimit
.
otherConsumptionLimit
}}
元
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 提示文字 -->
<view
class=
"tisptxt"
>
<view
class=
""
v-if=
"schoolConsumeLimit.parentConsumeLimit && schoolConsumeLimit.parentConsumeLimit == 1"
>
<text>
· 用户消费限制优先级高于学校消费限制
</text>
</view>
<view
class=
""
>
<text>
· 消费限额仅在学校消费机联网状态下生效
</text>
</view>
</view>
<!-- 设置保存按钮 -->
<view
class=
"savebtn"
@
tap=
"ConsumptionQuota"
v-if=
"schoolConsumeLimit.parentConsumeLimit == 1"
>
<text>
保存
</text>
</view>
</view>
</
template
>
<
script
>
import
{
Dialog
}
from
'
vant
'
;
import
config
from
'
../common/config.js
'
import
{
requestGet
,
requestPost
}
from
'
../common/request.js
'
export
default
{
components
:
{},
name
:
"
ConsumptionQuota
"
,
data
()
{
return
{
phone
:
'
***********
'
,
ImgUrl2
:
this
.
$ImgUrl
+
'
xzfalipay/
'
,
ImgUrl
:
this
.
$ImgUrl
+
'
/static/weapp/
'
,
usertype
:
[
''
,
'
学生
'
,
'
老师
'
],
// 消费限额选择胡用户
ConsumptionQuotaUser
:
{
userName
:
'
李书记
'
,
usertype
:
1
},
// 自定义限额设置
parentConsumeLimit
:
{
"
dailyCntLimit
"
:
0
,
//单日累计次数限制
"
dailyLimit
"
:
0
,
//单日累计消费上限 单位分
"
singleLimit
"
:
0
,
//单笔消费上限 单位分
"
switch
"
:
true
,
//限额开关 1开启 0关闭
"
supermarketConsumptionLimit
"
:
""
,
// 超市
"
canteenConsumptionLimit
"
:
""
,
// 食堂
"
otherConsumptionLimit
"
:
""
,
// 其他
},
// 默认限额设置
schoolConsumeLimit
:
{
// 20230706
'
parentConsumeLimit
'
:
1
,
"
dailyLimit
"
:
0
,
//单日累计消费上限 单位分
"
singleLimit
"
:
0
,
//单笔消费上限 单位分
"
dailyCntLimit
"
:
0
,
//单日累计次数限制
"
supermarketConsumptionLimit
"
:
""
,
// 超市
"
canteenConsumptionLimit
"
:
""
,
// 食堂
"
otherConsumptionLimit
"
:
""
,
// 其他
},
canteenTip
:
false
,
otherTip
:
false
,
superTip
:
false
,
// 消费会员弹框
showDlgModal
:
false
,
SchoolInfo
:
null
};
},
onLoad
:
function
()
{
this
.
getConsumeLimitData
()
// this.MySchoolInfo()
},
methods
:
{
// 我的学校信息
async
MySchoolInfo
()
{
try
{
uni
.
showLoading
({
title
:
"
请稍后
"
,
// #ifndef MP-ALIPAY
mask
:
true
,
// #endif
})
await
new
Promise
((
res
,
rej
)
=>
{
setTimeout
(()
=>
{
res
()
},
300
);
})
let
respes
=
await
this
.
$httpWX
.
post
({
url
:
'
/cgi-xpay/app/user/MySchoolInfo
'
},
{
"
accountId
"
:
this
.
ConsumptionQuotaUser
.
id
,
})
uni
.
hideLoading
()
if
(
respes
.
code
!=
200
)
{
uni
.
showToast
({
icon
:
"
error
"
,
title
:
respes
.
message
})
return
}
this
.
SchoolInfo
=
respes
.
data
||
{}
console
.
log
(
this
.
SchoolInfo
,
'
MySchoolInfoMySchoolInfo
'
);
}
catch
(
error
)
{
uni
.
showToast
({
icon
:
"
error
"
,
title
:
error
.
message
})
}
},
// 弹框点击事情
async
BtnEvent
(
type
)
{
console
.
warn
(
type
)
this
.
showDlgModal
=
false
uni
.
navigateBack
()
},
handleInput_0
(
e
)
{
let
price
=
e
.
detail
.
value
;
let
that
=
this
;
price
=
price
.
replace
(
/
[^\d
.
]
/g
,
""
);
price
=
price
.
replace
(
/
\.{2,}
/g
,
"
.
"
);
price
=
price
.
replace
(
"
.
"
,
"
$#$
"
).
replace
(
/
\.
/g
,
""
).
replace
(
"
$#$
"
,
"
.
"
);
price
=
price
.
replace
(
/^
(\-)
*
(\d
+
)\.(\d\d)
.*$/
,
'
$1$2.$3
'
);
if
(
price
.
indexOf
(
"
.
"
)
<
0
&&
price
!=
""
)
{
price
=
parseFloat
(
price
);
}
that
.
parentConsumeLimit
.
singleLimit
=
price
console
.
warn
(
"
handleInput
"
,
price
)
return
{
value
:
price
,
}
},
handleInput_1
(
e
)
{
let
price
=
e
.
detail
.
value
;
let
that
=
this
;
price
=
price
.
replace
(
/
[^\d
.
]
/g
,
""
);
price
=
price
.
replace
(
/
\.{2,}
/g
,
"
.
"
);
price
=
price
.
replace
(
"
.
"
,
"
$#$
"
).
replace
(
/
\.
/g
,
""
).
replace
(
"
$#$
"
,
"
.
"
);
price
=
price
.
replace
(
/^
(\-)
*
(\d
+
)\.(\d\d)
.*$/
,
'
$1$2.$3
'
);
if
(
price
.
indexOf
(
"
.
"
)
<
0
&&
price
!=
""
)
{
price
=
parseFloat
(
price
);
}
that
.
parentConsumeLimit
.
dailyLimit
=
price
console
.
warn
(
"
handleInput
"
,
price
)
return
{
value
:
price
,
}
},
handleInput
(
e
)
{
let
price
=
e
.
detail
.
value
;
let
that
=
this
;
if
(
price
==
0
&&
price
!=
""
)
{
that
.
canteenTip
=
true
;
}
else
{
that
.
canteenTip
=
false
;
}
price
=
price
.
replace
(
/
[^\d
.
]
/g
,
""
);
price
=
price
.
replace
(
/
\.{2,}
/g
,
"
.
"
);
price
=
price
.
replace
(
"
.
"
,
"
$#$
"
).
replace
(
/
\.
/g
,
""
).
replace
(
"
$#$
"
,
"
.
"
);
price
=
price
.
replace
(
/^
(\-)
*
(\d
+
)\.(\d\d)
.*$/
,
'
$1$2.$3
'
);
if
(
price
.
indexOf
(
"
.
"
)
<
0
&&
price
!=
""
)
{
price
=
parseFloat
(
price
);
}
price
=
price
>
150
?
150
:
price
;
that
.
parentConsumeLimit
.
canteenConsumptionLimit
=
price
console
.
warn
(
"
handleInput
"
,
price
)
return
{
value
:
price
,
}
},
handleInput2
(
e
)
{
let
price
=
e
.
detail
.
value
;
let
that
=
this
;
if
(
price
==
0
&&
price
!=
""
)
{
that
.
superTip
=
true
;
}
else
{
that
.
superTip
=
false
;
}
price
=
price
.
replace
(
/
[^\d
.
]
/g
,
""
);
price
=
price
.
replace
(
/
\.{2,}
/g
,
"
.
"
);
price
=
price
.
replace
(
"
.
"
,
"
$#$
"
).
replace
(
/
\.
/g
,
""
).
replace
(
"
$#$
"
,
"
.
"
);
price
=
price
.
replace
(
/^
(\-)
*
(\d
+
)\.(\d\d)
.*$/
,
'
$1$2.$3
'
);
if
(
price
.
indexOf
(
"
.
"
)
<
0
&&
price
!=
""
)
{
price
=
parseFloat
(
price
);
}
price
=
price
>
150
?
150
:
price
;
console
.
warn
(
"
handleInput2
"
,
price
)
that
.
parentConsumeLimit
.
supermarketConsumptionLimit
=
price
return
{
value
:
price
,
}
},
handleInput3
(
e
)
{
let
price
=
e
.
detail
.
value
;
let
that
=
this
;
// price = price.replace(/[^\d.]/g, "");
// price = price.replace(/\.{2,}/g, ".");
// price = price.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
// price = price.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3');
// if (price.indexOf(".")
<
0
&&
price
!=
""
)
{
// price = parseFloat(price);
// }
price
==
0
&&
price
!=
""
?
(
price
=
0
,
that
.
otherTip
=
true
)
:
(
""
,
that
.
otherTip
=
false
);
price
=
price
>
150
?
150
:
price
;
price
=
price
!=
0
?
price
.
replace
(
/
[^\d]
/g
,
''
)
:
"
0
"
that
.
parentConsumeLimit
.
otherConsumptionLimit
=
price
return
{
value
:
price
,
}
},
async
switchChange
(
e
)
{
console
.
warn
(
"
开启限额
"
,
e
.
detail
.
value
)
this
.
parentConsumeLimit
.
switch
=
e
.
detail
.
value
if
(
this
.
parentConsumeLimit
.
singleLimit
==
0
)
{
this
.
parentConsumeLimit
.
singleLimit
=
'
50.00
'
;
}
if
(
this
.
parentConsumeLimit
.
dailyLimit
==
0
)
{
this
.
parentConsumeLimit
.
dailyLimit
=
'
200.00
'
;
}
if
(
this
.
parentConsumeLimit
.
dailyCntLimit
==
0
)
{
this
.
parentConsumeLimit
.
dailyCntLimit
=
30
;
}
},
// 消费限额页数据
async
getConsumeLimitData
()
{
try
{
uni
.
showLoading
({
title
:
"
请稍后
"
,
// #ifndef MP-ALIPAY
mask
:
true
,
// #endif
})
await
new
Promise
((
res
,
rej
)
=>
{
setTimeout
(()
=>
{
res
()
},
10
);
})
const
respes
=
await
requestPost
(
'
/cgi-xpay/app/h5/ConsumeLimitData
'
,
{
accountId
:
0
})
uni
.
hideLoading
()
if
(
respes
[
'
code
'
]
!=
200
)
{
await
Dialog
({
message
:
respes
[
'
message
'
],
confirmButtonText
:
"
知道了
"
})
return
}
// 家长限额设置
this
.
parentConsumeLimit
=
respes
.
data
.
parentConsumeLimit
||
{
"
dailyCntLimit
"
:
0
,
"
dailyLimit
"
:
0
,
"
singleLimit
"
:
0
,
"
switch
"
:
false
,
"
supermarketConsumptionLimit
"
:
""
,
// 超市
"
canteenConsumptionLimit
"
:
""
,
// 食堂
"
otherConsumptionLimit
"
:
""
,
// 其他
};
this
.
parentConsumeLimit
.
dailyLimit
=
(
this
.
parentConsumeLimit
.
dailyLimit
/
100
).
toFixed
(
2
);
this
.
parentConsumeLimit
.
singleLimit
=
(
this
.
parentConsumeLimit
.
singleLimit
/
100
).
toFixed
(
2
);
this
.
parentConsumeLimit
.
switch
=
this
.
parentConsumeLimit
.
switch
==
1
?
true
:
false
;
this
.
parentConsumeLimit
.
supermarketConsumptionLimit
=
this
.
parentConsumeLimit
.
supermarketConsumptionLimit
>
0
?
(
this
.
parentConsumeLimit
.
supermarketConsumptionLimit
/
100
)
.
toFixed
(
2
)
:
"
--
"
;
this
.
parentConsumeLimit
.
canteenConsumptionLimit
=
this
.
parentConsumeLimit
.
canteenConsumptionLimit
>
0
?
(
this
.
parentConsumeLimit
.
canteenConsumptionLimit
/
100
).
toFixed
(
2
)
:
"
--
"
;
this
.
parentConsumeLimit
.
otherConsumptionLimit
=
this
.
parentConsumeLimit
.
otherConsumptionLimit
>
0
?
(
this
.
parentConsumeLimit
.
otherConsumptionLimit
/
100
).
toFixed
(
2
)
:
"
--
"
;
// 默认限额设置
this
.
schoolConsumeLimit
=
respes
.
data
.
schoolConsumeLimit
||
{
"
dailyLimit
"
:
0
,
"
singleLimit
"
:
0
,
"
dailyCntLimit
"
:
0
,
"
supermarketConsumptionLimit
"
:
""
,
// 超市
"
canteenConsumptionLimit
"
:
""
,
// 食堂
"
otherConsumptionLimit
"
:
""
,
// 其他
"
parentConsumeLimit
"
:
""
// 自定义消费限额
}
this
.
schoolConsumeLimit
.
dailyLimit
=
(
this
.
schoolConsumeLimit
.
dailyLimit
/
100
).
toFixed
(
2
);
this
.
schoolConsumeLimit
.
singleLimit
=
(
this
.
schoolConsumeLimit
.
singleLimit
/
100
).
toFixed
(
2
);
this
.
schoolConsumeLimit
.
supermarketConsumptionLimit
=
this
.
schoolConsumeLimit
.
supermarketConsumptionLimit
>
0
?
(
this
.
schoolConsumeLimit
.
supermarketConsumptionLimit
/
100
).
toFixed
(
2
)
:
"
--
"
;
this
.
schoolConsumeLimit
.
canteenConsumptionLimit
=
this
.
schoolConsumeLimit
.
canteenConsumptionLimit
>
0
?
(
this
.
schoolConsumeLimit
.
canteenConsumptionLimit
/
100
).
toFixed
(
2
)
:
"
--
"
;
this
.
schoolConsumeLimit
.
otherConsumptionLimit
=
this
.
schoolConsumeLimit
.
otherConsumptionLimit
>
0
?
(
this
.
schoolConsumeLimit
.
otherConsumptionLimit
/
100
).
toFixed
(
2
)
:
"
--
"
;
}
catch
(
error
)
{
uni
.
showToast
({
icon
:
"
error
"
,
title
:
error
.
message
})
}
},
// 设置保存按钮
async
ConsumptionQuota
()
{
try
{
if
(
this
.
parentConsumeLimit
.
singleLimit
===
0
)
{
uni
.
showToast
({
icon
:
"
none
"
,
// #ifndef MP-ALIPAY
mask
:
true
,
// #endif
title
:
"
单笔消费上限不能为0
"
})
return
}
if
(
this
.
parentConsumeLimit
.
singleLimit
===
""
)
{
uni
.
showToast
({
icon
:
"
none
"
,
// #ifndef MP-ALIPAY
mask
:
true
,
// #endif
title
:
"
单笔消费上限不能为空
"
})
return
}
if
(
this
.
parentConsumeLimit
.
singleLimit
>
100
)
{
uni
.
showToast
({
icon
:
"
none
"
,
// #ifndef MP-ALIPAY
mask
:
true
,
// #endif
title
:
"
单笔上限不能高于100元
"
})
return
}
if
(
this
.
parentConsumeLimit
.
dailyCntLimit
===
0
)
{
uni
.
showToast
({
icon
:
"
none
"
,
// #ifndef MP-ALIPAY
mask
:
true
,
// #endif
title
:
"
单日累计次数限制不能为0
"
})
return
}
if
(
this
.
parentConsumeLimit
.
dailyCntLimit
===
""
)
{
uni
.
showToast
({
icon
:
"
none
"
,
// #ifndef MP-ALIPAY
mask
:
true
,
// #endif
title
:
"
单日累计次数限制不能为空
"
})
return
}
if
(
this
.
parentConsumeLimit
.
dailyLimit
===
0
)
{
uni
.
showToast
({
icon
:
"
none
"
,
// #ifndef MP-ALIPAY
mask
:
true
,
// #endif
title
:
"
单日累计消费上限不能为0
"
})
return
}
if
(
this
.
parentConsumeLimit
.
dailyLimit
===
""
)
{
uni
.
showToast
({
icon
:
"
none
"
,
// #ifndef MP-ALIPAY
mask
:
true
,
// #endif
title
:
"
单日累计消费上限不能为空
"
})
return
}
if
(
this
.
parentConsumeLimit
.
dailyLimit
>
500
)
{
uni
.
showToast
({
icon
:
"
none
"
,
// #ifndef MP-ALIPAY
mask
:
true
,
// #endif
title
:
"
单日上限不能高于500元
"
})
return
}
let
sumTip
=
Number
(
this
.
parentConsumeLimit
.
canteenConsumptionLimit
)
+
Number
(
this
.
parentConsumeLimit
.
otherConsumptionLimit
)
+
Number
(
this
.
parentConsumeLimit
.
supermarketConsumptionLimit
)
if
(
this
.
parentConsumeLimit
.
dailyLimit
<
sumTip
)
{
uni
.
showToast
({
icon
:
"
none
"
,
// #ifndef MP-ALIPAY
mask
:
true
,
// #endif
title
:
"
所有场景限额之和不高于单日限额
"
})
return
}
uni
.
showLoading
({
title
:
"
请稍后
"
,
// #ifndef MP-ALIPAY
mask
:
true
,
// #endif
})
await
new
Promise
((
res
,
rej
)
=>
{
setTimeout
(()
=>
{
res
()
},
10
);
})
let
switchs
=
this
.
parentConsumeLimit
.
switch
?
1
:
0
;
let
dailyLimit
=
parseInt
(
this
.
parentConsumeLimit
.
dailyLimit
*
100
);
let
singleLimit
=
parseInt
(
this
.
parentConsumeLimit
.
singleLimit
*
100
);
let
canteenConsumptionLimit
=
this
.
parentConsumeLimit
.
canteenConsumptionLimit
>
0
?
(
parseInt
(
this
.
parentConsumeLimit
.
canteenConsumptionLimit
*
100
)
+
""
)
:
""
;
let
otherConsumptionLimit
=
this
.
parentConsumeLimit
.
otherConsumptionLimit
>
0
?
(
parseInt
(
this
.
parentConsumeLimit
.
otherConsumptionLimit
*
100
)
+
""
)
:
""
;
let
supermarketConsumptionLimit
=
this
.
parentConsumeLimit
.
supermarketConsumptionLimit
>
0
?
(
parseInt
(
this
.
parentConsumeLimit
.
supermarketConsumptionLimit
*
100
)
+
""
)
:
""
;
let
dailyCntLimit
=
parseInt
(
this
.
parentConsumeLimit
.
dailyCntLimit
);
if
(
switchs
==
1
)
{
if
(
dailyLimit
==
0
||
singleLimit
==
0
)
{
uni
.
showToast
({
icon
:
"
none
"
,
// #ifndef MP-ALIPAY
mask
:
true
,
// #endif
title
:
"
消费上限设置不能为0
"
})
uni
.
hideLoading
()
return
}
if
(
dailyLimit
<
singleLimit
)
{
uni
.
showToast
({
icon
:
"
none
"
,
// #ifndef MP-ALIPAY
mask
:
true
,
// #endif
title
:
"
单日累计需要大于单笔限额
"
})
uni
.
hideLoading
()
return
}
}
let
params
=
{
switch
:
switchs
,
dailyLimit
:
dailyLimit
,
singleLimit
:
singleLimit
,
dailyCntLimit
:
dailyCntLimit
,
canteenConsumptionLimit
:
canteenConsumptionLimit
,
otherConsumptionLimit
:
otherConsumptionLimit
,
supermarketConsumptionLimit
:
supermarketConsumptionLimit
,
};
// 设置消费限额
let
respes
=
await
this
.
$httpWX
.
post
({
url
:
'
/cgi-xpay/app/user/SetParentConsumeLimitV2
'
},
Object
.
assign
({
accountId
:
this
.
ConsumptionQuotaUser
.
id
,
// 消费用户账户id
},
params
))
if
(
respes
.
code
!=
200
)
{
uni
.
showToast
({
icon
:
"
none
"
,
// #ifndef MP-ALIPAY
mask
:
true
,
// #endif
title
:
respes
.
message
})
return
}
uni
.
hideLoading
()
uni
.
showToast
({
icon
:
"
success
"
,
title
:
"
保存成功!
"
})
setTimeout
(()
=>
{
uni
.
navigateBack
()
},
1000
)
}
catch
(
error
)
{
uni
.
showToast
({
icon
:
"
error
"
,
title
:
error
.
message
})
}
},
}
}
</
script
>
<
style
lang=
"scss"
>
page
{
width
:
100%
;
background
:
#F3F3F3
;
}
.ConsumptionQuota
{
padding-top
:
23rpx
;
padding-bottom
:
200rpx
;
.customSwitch
{
display
:
flex
;
padding
:
0
24rpx
;
height
:
101rpx
;
margin
:
24rpx
0
;
.itemInfo
{
width
:
100%
;
padding
:
0
32rpx
0
24rpx
;
background-color
:
white
;
border
:
1rpx
solid
white
;
display
:
flex
;
justify-content
:
space-between
;
border-radius
:
16rpx
;
view
{
align-self
:
center
;
}
}
}
.senceTip
{
margin-top
:
24rpx
;
font-size
:
28rpx
;
color
:
#FA6400
;
height
:
40rpx
;
line-height
:
40rpx
;
padding
:
0
48rpx
;
display
:
flex
;
.sumTip
{
width
:
28rpx
;
height
:
28rpx
;
align-self
:
center
;
margin-right
:
6rpx
;
}
}
.ConsumptionSetting
{
margin-top
:
16rpx
;
.SchoolSetting
,
.ParentSetting
{
width
:
702rpx
;
max-height
:
503rpx
;
background
:
#FFFFFF
;
border-radius
:
16rpx
;
margin
:
0
auto
;
.lable
{
height
:
101rpx
;
padding-left
:
24rpx
;
font-size
:
32rpx
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-weight
:
500
;
color
:
#333333
;
line-height
:
101rpx
;
display
:
flex
;
justify-content
:
space-between
;
.grey
{
color
:
rgba
(
0
,
0
,
0
,
0
.5
);
font-size
:
28rpx
;
padding-right
:
32rpx
;
}
}
.name
{
height
:
28rpx
;
font-size
:
28rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#333333
;
line-height
:
28rpx
;
}
}
.SchoolSetting
{
.itembox
{
width
:
654rpx
;
margin
:
0
auto
;
.itemInfo
{
display
:
flex
;
height
:
100rpx
;
line-height
:
100rpx
;
align-items
:
center
;
justify-content
:
space-between
;
}
}
.value
{
height
:
38rpx
;
font-size
:
32rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#333333
;
line-height
:
38rpx
;
display
:
flex
;
input
{
text-align
:
right
;
align-self
:
center
;
}
}
}
.placeholders
{
font-size
:
28rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#CCCCCC
;
}
.ParentSetting
{
margin-top
:
24rpx
;
.value
{
font-size
:
28rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#333333
;
input
{
height
:
100%
;
text-align
:
right
;
padding-right
:
16rpx
;
width
:
320rpx
;
}
}
.cantTip
{
position
:
absolute
;
top
:
0
;
left
:
104rpx
;
line-height
:
100rpx
;
color
:
#E02020
;
font-size
:
24rpx
;
z-index
:
1
;
}
.itembox
{
width
:
654rpx
;
margin
:
0
auto
;
.itemInfo
{
display
:
flex
;
height
:
100rpx
;
line-height
:
100rpx
;
align-items
:
center
;
justify-content
:
space-between
;
position
:
relative
;
}
}
}
}
.tisptxt
{
height
:
33rpx
;
font-size
:
24rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#ABABAB
;
line-height
:
33rpx
;
margin-left
:
48rpx
;
margin-top
:
24rpx
;
}
.savebtn
{
width
:
686rpx
;
height
:
90rpx
;
border-radius
:
45rpx
;
background
:
#04B871
;
margin
:
0
auto
;
line-height
:
90rpx
;
text-align
:
center
;
font-size
:
36rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#FFFFFF
;
position
:
fixed
;
bottom
:
52rpx
;
left
:
0
;
right
:
0
;
}
}
.userInfo
{
width
:
702rpx
;
height
:
247rpx
;
background
:
#FFFFFF
;
border-radius
:
16rpx
;
margin
:
0
auto
;
.lablet
{
height
:
101rpx
;
// background: #FFFFFF;
border-bottom
:
1rpx
solid
#F6F6F6
;
line-height
:
101rpx
;
padding-left
:
24rpx
;
}
.ItemInfoT
{
display
:
flex
;
height
:
146rpx
;
padding-left
:
24rpx
;
padding-top
:
34rpx
;
.box2
{
margin-left
:
14rpx
;
}
.username
{
height
:
36rpx
;
font-size
:
36rpx
;
font-weight
:
500
;
color
:
#333333
;
line-height
:
36rpx
;
}
.usertype
{
height
:
28rpx
;
font-size
:
28rpx
;
font-weight
:
400
;
color
:
#666666
;
line-height
:
28rpx
;
margin-left
:
16rpx
;
}
.schoolname
{
margin-top
:
12rpx
;
height
:
28rpx
;
font-size
:
28rpx
;
font-weight
:
400
;
color
:
#ABABAB
;
line-height
:
28rpx
;
}
}
.student
{
width
:
72rpx
;
height
:
72rpx
;
position
:
relative
;
}
}
</
style
>
\ No newline at end of file
src/pages/ApplyConsumption/Home/Home.vue
0 → 100644
View file @
de553b2a
<
template
>
<view
class=
"CampusConsumption"
>
<!-- 头部卡片 -->
<view
class=
"cardInfo"
:style=
"'background-image: url('+this.$ImgUrl + (HomeDataInfo['vipStatus']==1? 'applyCons/bgm.png':'applyCons/bgm1.png')+')'"
>
<view
class=
"userInfo"
>
<view
class=
"left"
>
<view
class=
"useravatar"
:style=
"'background-image: url('+this.$ImgUrl + 'applyCons/icon.png'+')'"
>
</view>
<view
class=
"name"
:style=
"HomeDataInfo['vipStatus']==1 ?'color: #512C19;':'color: rgba(0,0,0,0.85);' "
>
{{
HomeDataInfo
[
'
userName
'
]
||
'
安小智
'
}}
</view>
</view>
<view
class=
"right"
>
<image
v-if=
"HomeDataInfo['vipStatus']==1"
:src=
"this.$ImgUrl + 'applyCons/menber.png'"
mode=
"aspectFit"
></image>
<view
class=
"lable"
v-if=
"HomeDataInfo['vipStatus']==1"
>
您已开通消费会员
</view>
<view
class=
"lable"
v-else
:style=
"HomeDataInfo['vipStatus']==1 ?'':'color: rgba(0,0,0,0.85);' "
>
您尚未开通消费会员
</view>
</view>
</view>
<!-- 消费数据 -->
<view
class=
"cdatabox"
>
<view
class=
"cdatal"
>
<span
class=
"integer"
>
{{
HomeDataInfo
[
'
schoolConsumption
'
][
'
dailySpend_integer
'
]
}}
</span>
<span
class=
"decimal"
>
.
{{
HomeDataInfo
[
'
schoolConsumption
'
][
'
dailySpend_decimal
'
]
}}
</span>
<view
class=
"lable"
>
今日消费(元)
</view>
</view>
<view
class=
"cdatar"
>
<span
class=
"integer"
>
{{
HomeDataInfo
[
'
schoolConsumption
'
][
'
monthlySpend_integer
'
]
}}
</span>
<span
class=
"decimal"
>
.
{{
HomeDataInfo
[
'
schoolConsumption
'
][
'
monthlySpend_decimal
'
]
}}
</span>
<view
class=
"lable"
>
本月消费(元)
</view>
</view>
</view>
<!-- -->
<view
class=
"cdatabox2"
>
<view
class=
"cdatal"
:style=
"HomeDataInfo['schoolConsumption']['pendingcharge_decimal']>0?'color: red;':''"
@
click=
"goToPage(1)"
>
<span
class=
"integer"
>
{{
HomeDataInfo
[
'
schoolConsumption
'
][
'
pendingcharge_integer
'
]
}}
</span>
<span
class=
"decimal"
>
.
{{
HomeDataInfo
[
'
schoolConsumption
'
][
'
pendingcharge_decimal
'
]
}}
</span>
<view
class=
"lable"
>
<span>
待还款订单
</span>
<image
class=
"rigth"
:src=
"this.$ImgUrl + 'applyCons/rigth.png'"
mode=
"aspectFit"
></image>
</view>
</view>
<view
class=
"cdatar"
@
click=
"goToPage(2)"
>
<span
class=
"integer"
>
{{
HomeDataInfo
[
'
schoolConsumption
'
][
'
amount_integer
'
]
}}
</span>
<span
class=
"decimal"
>
.
{{
HomeDataInfo
[
'
schoolConsumption
'
][
'
amount_decimal
'
]
}}
</span>
<view
class=
"lable"
>
<span>
钱包余额
</span>
<image
class=
"rigth"
:src=
"this.$ImgUrl + 'applyCons/rigth.png'"
mode=
"aspectFit"
></image>
</view>
</view>
<view
class=
"cdatar"
@
click=
"goToPage(3)"
>
<span
class=
"integer"
>
{{
HomeDataInfo
[
'
schoolConsumption
'
][
'
subsidyBalance_integer
'
]
}}
</span>
<span
class=
"decimal"
>
.
{{
HomeDataInfo
[
'
schoolConsumption
'
][
'
subsidyBalance_decimal
'
]
}}
</span>
<view
class=
"lable"
>
<span>
补助金
</span>
<image
style=
"visibility: hidden;"
class=
"rigth"
:src=
"this.$ImgUrl + 'applyCons/rigth.png'"
mode=
"aspectFit"
></image>
</view>
</view>
</view>
</view>
<!-- 功能菜单 -->
<view
class=
"menuList"
>
<view
class=
"menuitem"
v-for=
"(item,index) in menuList"
:key=
"index"
@
click=
"menuClick(item)"
>
<view
class=
""
>
<view
class=
"title"
>
{{
item
.
title
||
''
}}
</view>
<view
class=
"sketch"
>
{{
item
.
sketch
||
''
}}
</view>
</view>
<view
class=
"icon"
>
<image
:src=
"item.icon"
mode=
"aspectFit"
></image>
</view>
</view>
</view>
<!-- 会员尊享权益 -->
<view
class=
"menberImg"
>
<image
:src=
"this.$ImgUrl + 'applyCons/menberImg.png'"
mode=
"aspectFit"
></image>
<view
class=
"tomenber"
@
tap=
"openAzMenber"
></view>
</view>
</view>
</
template
>
<
script
>
import
{
Dialog
}
from
'
vant
'
;
import
config
from
'
../common/config.js
'
import
{
requestGet
,
requestPost
}
from
'
../common/request.js
'
export
default
{
name
:
"
CampusConsumption
"
,
data
()
{
return
{
ImgUrl
:
this
.
$ImgUrl
,
menuList
:
Array
(
4
).
fill
(
1
).
map
((
v
,
index
)
=>
{
return
{
path
:
[
'
../ConsumptIoninfo/ConsumptIoninfo
'
,
'
../ConsumptionQuota/ConsumptionQuota
'
,
'
/pages/ConsumptionSystem/AbnormalConsumption/AbnormalConsumption?userId=4145549&schoolId=60804
'
,
'
../CommonProblem/CommonProblem
'
][
index
],
title
:
[
'
消费记录
'
,
'
消费限额
'
,
'
消费异常
'
,
'
常见问题
'
][
index
],
sketch
:
[
'
消费记录 笔笔可查
'
,
'
设置额度 管控消费
'
,
'
消费异常 每日提醒
'
,
'
使用疑问 一一解答
'
][
index
],
icon
:
this
.
$ImgUrl
+
`applyCons/menu
${
index
+
1
}
.png`
}
}),
HomeDataInfo
:
{
// 账户id
"
accountId
"
:
0
,
"
schoolConsumption
"
:
{
// 钱包余额 单位分
"
amount
"
:
0
,
// 今日消费 单位分
"
dailySpend
"
:
0
,
// 本月消费 单位分
"
monthlySpend
"
:
0
,
// 欠款金额 单位分
"
pendingcharge
"
:
0
,
// 补助余额 单位分
"
subsidyBalance
"
:
0
},
// 用户姓名
"
userName
"
:
""
,
// 刷脸消费会员剩余天数
"
vipDaysRemaining
"
:
0
,
// 刷脸消费会员到期时间
"
vipExpiredDt
"
:
""
,
// 刷脸消费会员开通状态 1已开通并生效 2未开通 3已过期 4未生效
"
vipStatus
"
:
1
}
};
},
onLoad
(
options
)
{
uni
.
setStorageSync
(
'
token
'
,
`eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwaG9uZSI6IjE4OTQyNTA4MzY0IiwidXNlcklkIjoiMjA4ODIxMjM4MzI0MDM1MSIsImJpbmRVc2VySWQiOiI2MTMwMCIsImJpbmRVc2VyVHlwZSI6IjIiLCJiaW5kQWNjb3VudElkIjoiMTEzIiwic291cmNlIjoiYWxpcGF5IiwiZXhwIjoxNjg4NzE3MDQyLCJpc3MiOiJhZG1pbiIsIm5iZiI6MTY4ODcxMjQ0Mn0.TJIWWE85hrDLENglp5YVqh8sVFzi5hE-17DjfputrOg`
)
this
.
HomePageData
()
// if (!options['schoolId'] || !options['userId']) {
// Dialog({
// title: '系统提示!',
// message: '学生Id或学校Id为必传参数!',
// confirmButtonText: "知道了"
// }).then(res => {
// window.close()
// })
// return;
// }
},
methods
:
{
// 查询消费会员权益项
async
QueryProductContractItem
()
{
const
data
=
await
requestPost
(
'
/cgi-xpay/app/h5/QueryProductContractItem
'
,
{
accountId
:
this
.
HomeDataInfo
[
'
accountId
'
],
serviceItemCode
:
'
1008
'
})
if
(
data
[
'
code
'
]
!=
200
)
{
await
Dialog
({
message
:
data
[
'
message
'
],
confirmButtonText
:
"
知道了
"
})
return
}
console
.
warn
(
data
)
},
// 获取首页数据
async
HomePageData
()
{
const
data
=
await
requestPost
(
'
/cgi-xpay/app/h5/HomePageData
'
,
{})
if
(
data
[
'
code
'
]
!=
200
)
{
await
Dialog
({
message
:
data
[
'
message
'
],
confirmButtonText
:
"
知道了
"
})
return
}
const
schoolConsumption
=
data
.
data
[
'
schoolConsumption
'
]
for
(
let
s
in
schoolConsumption
)
{
let
integer
=
0
,
decimal
=
0
const
value
=
(
schoolConsumption
[
s
]
/
100
).
toFixed
(
2
)
integer
=
value
.
split
(
"
.
"
)[
0
]
decimal
=
value
.
split
(
"
.
"
)[
1
]
schoolConsumption
[
`
${
s
}
_integer`
]
=
integer
schoolConsumption
[
`
${
s
}
_decimal`
]
=
decimal
}
data
.
data
[
'
schoolConsumption
'
]
=
schoolConsumption
this
.
HomeDataInfo
=
data
.
data
// 查询消费会员权益项
this
.
QueryProductContractItem
()
},
// 跳转页面
async
goToPage
(
value
)
{
switch
(
value
)
{
case
1
:
break
;
case
2
:
break
;
case
3
:
break
;
default
:
break
;
}
},
// 跳转云平台权益中心
async
openAzMenber
()
{
wx
.
miniProgram
.
navigateTo
({
url
:
'
/pages/nationalCenterForLesbianRights/index
'
})
},
// 菜单跳转
async
menuClick
(
item
)
{
console
.
warn
(
item
)
if
(
!
item
.
path
)
{
return
}
uni
.
switchTab
({
url
:
item
.
path
,
fail
:
()
=>
{
uni
.
navigateTo
({
url
:
item
.
path
})
}
})
}
}
}
</
script
>
<
style
lang=
"scss"
>
page
{
width
:
100%
;
background
:
#F1F1F3
;
}
.CampusConsumption
{
.cardInfo
{
width
:
686rpx
;
height
:
435rpx
;
margin
:
0
auto
;
margin-top
:
24rpx
;
background-size
:
100%
100%
;
background-repeat
:
no-repeat
;
position
:
relative
;
.cdatabox2
{
display
:
flex
;
justify-content
:
space-around
;
margin-top
:
57rpx
;
.cdatal
,
.cdatar
{
font-family
:
DINAlternate-Bold
,
DINAlternate
;
color
:
rgba
(
0
,
0
,
0
,
0
.85
);
.lable
{
display
:
flex
;
align-items
:
center
;
height
:
37rpx
;
font-size
:
26rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
rgba
(
0
,
0
,
0
,
0
.4
);
line-height
:
37rpx
;
.rigth
{
position
:
relative
;
height
:
24rpx
;
width
:
24rpx
;
left
:
5rpx
;
}
}
}
.integer
{
display
:
inline-block
;
font-size
:
36rpx
;
}
.
integer
:
:
before
{
content
:
'\00A5'
;
font-size
:
28rpx
;
font-family
:
DIN
Alternate
Bold
;
font-weight
:
bold
;
}
.decimal
{
font-size
:
30rpx
;
}
}
.cdatabox
{
display
:
flex
;
margin-top
:
20rpx
;
.cdatal
,
.cdatar
{
font-family
:
DINAlternate-Bold
,
DINAlternate
;
color
:
rgba
(
0
,
0
,
0
,
0
.85
);
.lable
{
height
:
40rpx
;
font-size
:
28rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
rgba
(
0
,
0
,
0
,
0
.4
);
line-height
:
40rpx
;
}
}
.cdatal
{
margin-left
:
53rpx
;
}
.cdatar
{
margin-left
:
219rpx
;
}
.integer
{
font-size
:
60rpx
;
}
.decimal
{
font-size
:
30rpx
;
}
}
.userInfo
{
height
:
110rpx
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
.left
{
display
:
flex
;
align-items
:
center
;
padding-left
:
30rpx
;
.name
{
margin-left
:
14rpx
;
font-size
:
34rpx
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-weight
:
500
;
}
.useravatar
{
height
:
52rpx
;
width
:
52rpx
;
border-radius
:
50%
;
background-color
:
white
;
background-size
:
100%
100%
;
background-repeat
:
no-repeat
;
border
:
4rpx
solid
white
;
}
image
{
position
:
relative
;
height
:
100%
;
width
:
100%
;
}
}
.right
{
padding-right
:
24rpx
;
display
:
flex
;
align-items
:
center
;
.lable
{
font-size
:
28rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
rgba
(
81
,
44
,
25
,
0
.7
);
}
image
{
position
:
relative
;
height
:
36rpx
;
width
:
36rpx
;
left
:
-9rpx
;
}
}
}
}
.menberImg
{
height
:
516rpx
;
width
:
686rpx
;
margin
:
0
auto
;
margin-top
:
32rpx
;
position
:
relative
;
image
{
position
:
relative
;
height
:
100%
;
width
:
100%
;
}
.tomenber
{
width
:
600rpx
;
height
:
90rpx
;
background
:
linear-gradient
(
270deg
,
#FDC359
0%
,
#FADDA3
100%
);
border-radius
:
12rpx
;
position
:
absolute
;
margin
:
0
auto
;
left
:
0
;
right
:
0
;
bottom
:
35rpx
;
opacity
:
0
;
}
}
.menuList
{
width
:
686rpx
;
background
:
#F1F1F3
;
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
space-between
;
align-items
:
center
;
margin
:
0
auto
;
.menuitem
{
width
:
331rpx
;
height
:
136rpx
;
background
:
#FFFFFF
;
border-radius
:
16rpx
;
margin-top
:
24rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-evenly
;
.title
{
height
:
42rpx
;
font-size
:
30rpx
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-weight
:
500
;
color
:
#333333
;
line-height
:
42rpx
;
}
.sketch
{
height
:
28rpx
;
font-size
:
20rpx
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
rgba
(
0
,
0
,
0
,
0
.3
);
line-height
:
28rpx
;
}
image
{
position
:
relative
;
height
:
80rpx
;
width
:
80rpx
;
}
}
}
}
</
style
>
\ No newline at end of file
src/pages/ApplyConsumption/OrderClearSuspicions/OrderClearSuspicions.vue
0 → 100644
View file @
de553b2a
<
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 @
de553b2a
H5消费应用模块
\ No newline at end of file
src/pages/ApplyConsumption/common/config.js
0 → 100644
View file @
de553b2a
/**
* @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
json
=
{
env
,
baseURL
}
export
default
json
;
\ No newline at end of file
src/pages/ApplyConsumption/common/request.js
0 → 100644
View file @
de553b2a
/**
*
* 请求封装
*
*/
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
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