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
692275c7
Commit
692275c7
authored
Jul 19, 2023
by
lizhishu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.提交更新;
parent
de553b2a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
14 deletions
+31
-14
src/pages/ApplyConsumption/Home/Home.vue
src/pages/ApplyConsumption/Home/Home.vue
+31
-14
No files found.
src/pages/ApplyConsumption/Home/Home.vue
View file @
692275c7
...
...
@@ -143,22 +143,37 @@
};
},
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
:
'
alipay
'
,
code
:
token
,
})
console
.
warn
(
"
登录获取用户信息
"
,
data
)
if
(
data
[
'
code
'
]
!=
200
)
{
await
Dialog
({
title
:
'
温馨提示
'
,
message
:
data
[
'
message
'
],
confirmButtonText
:
"
知道了
"
})
return
}
uni
.
setStorageSync
(
'
token
'
,
data
.
data
[
'
token
'
])
this
.
HomePageData
()
},
// 查询消费会员权益项
async
QueryProductContractItem
()
{
const
data
=
await
requestPost
(
'
/cgi-xpay/app/h5/QueryProductContractItem
'
,
{
...
...
@@ -167,6 +182,7 @@
})
if
(
data
[
'
code
'
]
!=
200
)
{
await
Dialog
({
title
:
'
温馨提示
'
,
message
:
data
[
'
message
'
],
confirmButtonText
:
"
知道了
"
})
...
...
@@ -179,6 +195,7 @@
const
data
=
await
requestPost
(
'
/cgi-xpay/app/h5/HomePageData
'
,
{})
if
(
data
[
'
code
'
]
!=
200
)
{
await
Dialog
({
title
:
'
温馨提示
'
,
message
:
data
[
'
message
'
],
confirmButtonText
:
"
知道了
"
})
...
...
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