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
78421bc6
Commit
78421bc6
authored
Jul 19, 2023
by
袁玲利
Browse files
Options
Browse Files
Download
Plain Diff
充值和消费界面新增
parents
763c770e
7a08ae19
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
24 deletions
+54
-24
src/pages/ApplyConsumption/ConsumptionQuota/ConsumptionQuota.vue
...es/ApplyConsumption/ConsumptionQuota/ConsumptionQuota.vue
+3
-5
src/pages/ApplyConsumption/Home/Home.vue
src/pages/ApplyConsumption/Home/Home.vue
+36
-18
src/pages/ApplyConsumption/common/config.js
src/pages/ApplyConsumption/common/config.js
+15
-1
No files found.
src/pages/ApplyConsumption/ConsumptionQuota/ConsumptionQuota.vue
View file @
78421bc6
...
...
@@ -363,7 +363,7 @@
},
10
);
})
const
respes
=
await
requestPost
(
'
/cgi-xpay/app/h5/ConsumeLimitData
'
,
{
accountId
:
0
accountId
:
sessionStorage
.
getItem
(
'
accountId
'
)
*
1
})
uni
.
hideLoading
()
if
(
respes
[
'
code
'
]
!=
200
)
{
...
...
@@ -574,10 +574,8 @@
supermarketConsumptionLimit
:
supermarketConsumptionLimit
,
};
// 设置消费限额
let
respes
=
await
this
.
$httpWX
.
post
({
url
:
'
/cgi-xpay/app/user/SetParentConsumeLimitV2
'
},
Object
.
assign
({
accountId
:
this
.
ConsumptionQuotaUser
.
id
,
// 消费用户账户id
const
respes
=
await
requestPost
(
'
/cgi-xpay/app/h5/SetParentConsumeLimit
'
,
Object
.
assign
({
accountId
:
sessionStorage
.
getItem
(
'
accountId
'
)
*
1
,
// 消费用户账户id
},
params
))
if
(
respes
.
code
!=
200
)
{
uni
.
showToast
({
...
...
src/pages/ApplyConsumption/Home/Home.vue
View file @
78421bc6
...
...
@@ -96,6 +96,7 @@
Dialog
}
from
'
vant
'
;
import
config
from
'
../common/config.js
'
// console.warn(config['ServiceEnum'])
import
{
requestGet
,
requestPost
...
...
@@ -143,42 +144,58 @@
};
},
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;
// }
if
(
!
options
[
'
token
'
])
{
Dialog
({
title
:
'
系统提示
'
,
message
:
'
token为空!
'
,
confirmButtonText
:
"
知道了
"
}).
then
(
res
=>
{
window
.
close
()
})
return
;
}
this
.
UserLogin
(
options
[
'
token
'
])
},
methods
:
{
//登录获取用户信息
async
UserLogin
(
token
)
{
let
data
=
await
requestPost
(
'
/cgi-xpay/app/Login
'
,
{
grantType
:
'
GT_azCloud_h5
'
,
code
:
token
,
})
if
(
data
[
'
code
'
]
!=
200
)
{
await
Dialog
({
title
:
'
温馨提示
'
,
message
:
data
[
'
message
'
],
confirmButtonText
:
"
知道了
"
})
return
}
uni
.
setStorageSync
(
'
token
'
,
data
.
data
[
'
token
'
])
this
.
HomePageData
()
},
// 查询消费会员权益项
async
QueryProductContractItem
()
{
async
QueryProductContractItem
(
serviceItemCode
=
'
1008
'
)
{
const
data
=
await
requestPost
(
'
/cgi-xpay/app/h5/QueryProductContractItem
'
,
{
accountId
:
this
.
HomeDataInfo
[
'
accountId
'
],
serviceItemCode
:
'
1008
'
serviceItemCode
})
if
(
data
[
'
code
'
]
!=
200
)
{
await
Dialog
({
title
:
'
温馨提示
'
,
message
:
data
[
'
message
'
],
confirmButtonText
:
"
知道了
"
})
return
}
console
.
warn
(
data
)
return
data
.
data
[
'
result
'
]
},
// 获取首页数据
async
HomePageData
()
{
const
data
=
await
requestPost
(
'
/cgi-xpay/app/h5/HomePageData
'
,
{})
if
(
data
[
'
code
'
]
!=
200
)
{
await
Dialog
({
title
:
'
温馨提示
'
,
message
:
data
[
'
message
'
],
confirmButtonText
:
"
知道了
"
})
...
...
@@ -196,6 +213,7 @@
}
data
.
data
[
'
schoolConsumption
'
]
=
schoolConsumption
this
.
HomeDataInfo
=
data
.
data
sessionStorage
.
setItem
(
'
accountId
'
,
this
.
HomeDataInfo
[
'
accountId
'
])
// 查询消费会员权益项
this
.
QueryProductContractItem
()
},
...
...
@@ -214,7 +232,7 @@
},
// 跳转云平台权益中心
async
openAzMenber
()
{
wx
.
miniProgram
.
navigateTo
({
jWeixin
.
miniProgram
.
navigateTo
({
url
:
'
/pages/nationalCenterForLesbianRights/index
'
})
},
...
...
src/pages/ApplyConsumption/common/config.js
View file @
78421bc6
...
...
@@ -23,8 +23,22 @@ 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
baseURL
,
ServiceEnum
}
export
default
json
;
\ 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