Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
c27bcea7
Commit
c27bcea7
authored
Jun 18, 2020
by
linboxuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ucommune usertoken register
parent
db68aa54
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
10 deletions
+5
-10
center-channel/app/base/service/impl/utilsSve/utilsUcommuneSve.js
+5
-10
No files found.
center-channel/app/base/service/impl/utilsSve/utilsUcommuneSve.js
View file @
c27bcea7
...
@@ -29,13 +29,13 @@ class UtilsUcommuneService extends AppServiceBase {
...
@@ -29,13 +29,13 @@ class UtilsUcommuneService extends AppServiceBase {
let
result
=
await
this
.
restPostWithHAuthorizationUrl
(
pobj
,
actionBody
.
userToken
,
url
);
let
result
=
await
this
.
restPostWithHAuthorizationUrl
(
pobj
,
actionBody
.
userToken
,
url
);
if
(
result
.
retCode
==
0
)
{
// 0成功 1失败
if
(
result
.
retCode
==
0
)
{
// 0成功 1失败
pobj
.
actionType
=
"getLoginByUserName"
;
pobj
.
actionType
=
"getLoginByUserName"
;
pobj
.
actionBody
.
channelUserId
=
result
.
data
.
nationalCode
+
result
.
data
.
mobile
;
// 即:86_18512345678
pobj
.
actionBody
.
channelUserId
=
result
.
data
.
nationalCode
+
"-"
+
result
.
data
.
mobile
;
// 即:86_18512345678
pobj
.
actionBody
.
userpin
=
pobj
.
actionBody
.
userpin
||
this
.
getUUID
();
pobj
.
actionBody
.
userpin
=
pobj
.
actionBody
.
userpin
||
this
.
getUUID
();
var
tmpOpResult
=
await
this
.
utilsAuthSve
.
getLoginByUserName
(
pobj
,
pobj
.
actionBody
);
var
tmpOpResult
=
await
this
.
utilsAuthSve
.
getLoginByUserName
(
pobj
,
pobj
.
actionBody
);
if
(
tmpOpResult
.
status
!=
0
&&
tmpOpResult
.
status
!=
2060
)
{
if
(
tmpOpResult
.
status
!=
0
&&
tmpOpResult
.
status
!=
2060
)
{
return
tmpOpResult
;
return
tmpOpResult
;
}
}
return
system
.
getResultSuccess
({
userpin
:
tmpOpResult
.
data
.
userpin
})
return
system
.
getResultSuccess
({
userpin
:
tmpOpResult
.
data
.
userpin
?
tmpOpResult
.
data
.
userpin
:
pobj
.
actionBody
.
userpin
})
}
else
{
}
else
{
// 获取用户信息失败
// 获取用户信息失败
return
system
.
getResult
(
null
,
"Failed to get user information, 100420"
);
return
system
.
getResult
(
null
,
"Failed to get user information, 100420"
);
...
@@ -90,13 +90,8 @@ class UtilsUcommuneService extends AppServiceBase {
...
@@ -90,13 +90,8 @@ class UtilsUcommuneService extends AppServiceBase {
console
.
log
(
alipayResponse
);
console
.
log
(
alipayResponse
);
}
}
if
(
actionBody
.
payWay
==
3
)
{
// 微信
if
(
actionBody
.
payWay
==
3
)
{
// 微信
var
wxpay
=
this
.
WXpay
({
console
.
log
(
this
.
WXpay
)
appid
:
'wx6f3ebe44defe336a'
,
var
wxpay
=
this
.
WXpay
;
mch_id
:
'1232813602'
,
partner_key
:
'sinotone2014sinotone2014sinotone'
,
//微信商户平台API密钥
//pfx: fs.readFileSync('./wxpay_cert.p12'), //微信商户平台证书
//pfx: "sinotone2014sinotone2014sinotone"
});
var
out_trade_no
=
'20160203'
+
Math
.
random
().
toString
().
substr
(
2
,
10
);
var
out_trade_no
=
'20160203'
+
Math
.
random
().
toString
().
substr
(
2
,
10
);
wxpay
.
createUnifiedOrder
({
wxpay
.
createUnifiedOrder
({
body
:
'充值兑换宝币'
,
body
:
'充值兑换宝币'
,
...
@@ -108,9 +103,9 @@ class UtilsUcommuneService extends AppServiceBase {
...
@@ -108,9 +103,9 @@ class UtilsUcommuneService extends AppServiceBase {
product_id
:
'1234567890'
product_id
:
'1234567890'
},
function
(
err
,
result
){
},
function
(
err
,
result
){
console
.
log
(
result
);
console
.
log
(
result
);
return
result
})
})
}
}
return
system
.
getResult
(
null
,
"actionBody.payWay is eoor values,100450"
);
}
}
/**
/**
...
...
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