Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
zhwy
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6c1696a9
authored
Oct 12, 2023
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
红包登陆,自动跳转
1 parent
ed1d6599
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
packageEquity/pages/freecard/freecard.js
pages/crowdfunding/blank/blank.js
packageEquity/pages/freecard/freecard.js
View file @
6c1696a
...
...
@@ -39,7 +39,7 @@ Page({
message
}
=
await
wx
.
p
.
api
.
userApi
.
authUserPhone
(
detail
,
this
.
sessionId
)
wx
.
hideLoading
()
if
(
code
==
'0'
)
this
.
customerLoginCallBack
(
data
)
if
(
code
==
'0'
)
this
.
customerLoginCallBack
(
data
,
true
)
else
throw
message
}
catch
(
error
)
{
this
.
showTips
(
error
||
'服务不可用'
)
...
...
@@ -53,7 +53,7 @@ Page({
wx
.
p
.
wxApi
.
showToast
(
typeof
message
==
'string'
?
message
:
'请同意以下用户协议'
)
},
customerLoginCallBack
(
data
)
{
customerLoginCallBack
(
data
,
isAuto
=
false
)
{
wx
.
$LoginStatus
=
false
wx
.
p
.
storage
.
set
(
'userInfo'
,
data
)
wx
.
p
.
storage
.
set
(
'sessionId'
,
data
.
sessionId
)
...
...
@@ -82,6 +82,8 @@ Page({
this
.
setData
({
hasUserInfo
:
true
})
}
else
if
(
isAuto
)
{
this
.
jumpAuthUserInfo
()
}
},
async
jumpAuthUserInfo
()
{
...
...
@@ -93,7 +95,7 @@ Page({
// redirectUrl = `${domain}/wx-oauth`,
redirectUrl
=
`https://scrm.glsx.com.cn/wx-oauth`
,
// redirectUrl = 'http://scrm.dev.glsx.com.cn/wx-oauth',
// 云商 wx1cf40dc91c28a7fd ,glsxtest02 wx56bed167ad463f70
// 云商
/业主生活社开发者
wx1cf40dc91c28a7fd ,glsxtest02 wx56bed167ad463f70
appid
=
'wx56bed167ad463f70'
,
wxUrl
=
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=
${
appid
}
&redirect_uri=
${
encodeURIComponent
(
redirectUrl
)}
&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
console
.
log
(
redirectUrl
,
appid
)
...
...
pages/crowdfunding/blank/blank.js
View file @
6c1696a
...
...
@@ -24,6 +24,7 @@ Page({
headImgUrl
:
info
.
avatarUrl
,
hasUserInfo
:
true
})
res
.
toCheckMember
()
let
item
=
{
add_way
:
'104'
,
customer_phone
:
res
.
data
.
userInfo
.
phone
,
...
...
@@ -33,7 +34,7 @@ Page({
}
let
json
=
JSON
.
stringify
(
item
)
// 数据上报
wx
.
p
.
api
.
common
.
trackHttp
({
json
}).
then
(
response
=>
{})
wx
.
p
.
api
.
common
.
trackHttp
({
json
}).
then
(
response
=>
{
})
})
},
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment