Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高淑倩
7-Eleven
Commits
e3062f85
Commit
e3062f85
authored
May 29, 2019
by
daqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 会员中心接口&& title
parent
e00e49ad
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
6 deletions
+36
-6
userCenter.js
src/pages/userCenter/userCenter.js
+30
-1
Http.js
src/utils/Http.js
+4
-4
util.js
src/utils/util.js
+2
-1
No files found.
src/pages/userCenter/userCenter.js
View file @
e3062f85
...
...
@@ -30,7 +30,36 @@ wxService.page({
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
this
.
initPage
()
},
// page 信息
initPage
(){
wx
.
showLoading
({
title
:
'加载中'
})
wxService
.
post
(
`/merchant/modelPage/getDetailById?pageId=2`
).
then
(
res
=>
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
){
wx
.
hideLoading
()
// 动态设置title
wx
.
setNavigationBarTitle
({
title
:
data
.
page
.
title
})
// 段落
const
product
=
data
.
paragraphs
const
filterResult
=
product
.
map
((
res
,
index
)
=>
{
return
{
...
res
,
index
}
}).
filter
(
item
=>
{
})
}
}).
finally
(()
=>
{
wx
.
hideLoading
();
})
},
/**
...
...
src/utils/Http.js
View file @
e3062f85
...
...
@@ -85,8 +85,8 @@ class Http {
method
:
'GET'
,
header
:
{
// 'buyer-token': this.getToken()
// 'buyer-token': '187ef4436122d1cc2f40dc2b92f0eba0
'
'seller-token'
:
'f80d09122733517ea4a0c2628c4eb0e9'
'buyer-token'
:
'3e15b819c551713ae210adc525da028b
'
//
'seller-token': 'f80d09122733517ea4a0c2628c4eb0e9'
},
data
:
parmas
})
...
...
@@ -98,8 +98,8 @@ class Http {
method
:
'POST'
,
header
:
{
// 'buyer-token': wx.getStorageSync('token')
// 'buyer-token':'187ef4436122d1cc2f40dc2b92f0eba0
'
'seller-token'
:
'f80d09122733517ea4a0c2628c4eb0e9'
'buyer-token'
:
'3e15b819c551713ae210adc525da028b
'
//
'seller-token': 'f80d09122733517ea4a0c2628c4eb0e9'
},
data
:
parmas
,
channel
:
channel
...
...
src/utils/util.js
View file @
e3062f85
...
...
@@ -160,7 +160,8 @@ function getUserInfoByBtn(userInfo) {
})
return
wxService
.
post
(
`/member/minaLogin`
,
{
code
:
res
[
1
].
code
,
wechatInfo
:
res
[
0
]
wechatInfo
:
res
[
0
],
brandId
:
1001
,
})
},
(
err
)
=>
{
return
Promise
.
reject
(
err
)
...
...
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