Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taobao-mini-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
qinhaitao
taobao-mini-template
Commits
485286a9
Commit
485286a9
authored
Oct 17, 2020
by
qinhaitao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:
🐛
session
parent
5253e683
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
13 deletions
+25
-13
registeInfos.js
v2.0/dist/decorator/registeInfos.js
+19
-12
registeInfos.js.map
v2.0/dist/decorator/registeInfos.js.map
+1
-1
registeInfos.ts
v2.0/src/decorator/registeInfos.ts
+5
-0
No files found.
v2.0/dist/decorator/registeInfos.js
View file @
485286a9
...
...
@@ -55,34 +55,41 @@ var vip_1 = require("../utils/package/vip");
function
initBaseInfo
(
context
,
baseInfos
,
needInfos
)
{
var
_a
,
_b
,
_c
;
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
var
handler
,
userService
,
userInfo
,
_d
,
session
,
userNick
,
vipInfo
;
return
__generator
(
this
,
function
(
_
e
)
{
switch
(
_
e
.
label
)
{
var
handler
,
userService
,
userInfo
,
_d
,
session
,
userNick
,
_e
,
session
,
userNick
,
vipInfo
;
return
__generator
(
this
,
function
(
_
f
)
{
switch
(
_
f
.
label
)
{
case
0
:
handler
=
(
_c
=
(
_b
=
(
_a
=
context
===
null
||
context
===
void
0
?
void
0
:
context
.
cloud
)
===
null
||
_a
===
void
0
?
void
0
:
_a
.
dataspace
)
===
null
||
_b
===
void
0
?
void
0
:
_b
.
context
)
===
null
||
_c
===
void
0
?
void
0
:
_c
.
handler
;
userService
=
new
service_1
.
UserService
(
context
);
if
(
!
(
needInfos
.
includes
(
'userInfo'
)
&&
!
baseInfos
.
userInfo
))
return
[
3
/*break*/
,
2
];
return
[
4
/*yield*/
,
userService
.
getUserInfo
()];
case
1
:
userInfo
=
_
e
.
sent
();
userInfo
=
_
f
.
sent
();
baseInfos
.
userInfo
=
userInfo
;
_
e
.
label
=
2
;
_
f
.
label
=
2
;
case
2
:
if
(
!
(
needInfos
.
includes
(
'session'
)
&&
!
baseInfos
.
session
))
return
[
3
/*break*/
,
4
];
return
[
4
/*yield*/
,
utils_1
.
getSellerSession
(
context
)];
case
3
:
_d
=
_
e
.
sent
(),
session
=
_d
.
session
,
userNick
=
_d
.
userNick
;
_d
=
_
f
.
sent
(),
session
=
_d
.
session
,
userNick
=
_d
.
userNick
;
baseInfos
.
session
=
session
;
baseInfos
.
activityUserNick
=
userNick
;
_
e
.
label
=
4
;
_
f
.
label
=
4
;
case
4
:
if
(
!
(
needInfos
.
includes
(
'vipInfo'
)
&&
!
baseInfos
.
vipInfo
&&
handler
!==
'getVipInfo'
))
return
[
3
/*break*/
,
6
];
return
[
4
/*yield*/
,
userService
.
getShopVip
(
baseInfos
.
session
,
vip_1
.
formatVipCbUrl
(
context
),
baseInfos
.
activityUserNick
)];
if
(
!
(
needInfos
.
includes
(
'vipInfo'
)
&&
!
baseInfos
.
vipInfo
&&
handler
!==
'getVipInfo'
))
return
[
3
/*break*/
,
8
];
if
(
!!
baseInfos
.
session
)
return
[
3
/*break*/
,
6
];
return
[
4
/*yield*/
,
utils_1
.
getSellerSession
(
context
)];
case
5
:
vipInfo
=
_e
.
sent
();
_e
=
_f
.
sent
(),
session
=
_e
.
session
,
userNick
=
_e
.
userNick
;
baseInfos
.
session
=
session
;
baseInfos
.
activityUserNick
=
userNick
;
_f
.
label
=
6
;
case
6
:
return
[
4
/*yield*/
,
userService
.
getShopVip
(
baseInfos
.
session
,
vip_1
.
formatVipCbUrl
(
context
),
baseInfos
.
activityUserNick
)];
case
7
:
vipInfo
=
_f
.
sent
();
baseInfos
.
vipInfo
=
vipInfo
;
_
e
.
label
=
6
;
case
6
:
return
[
2
/*return*/
,
baseInfos
];
_
f
.
label
=
8
;
case
8
:
return
[
2
/*return*/
,
baseInfos
];
}
});
});
...
...
v2.0/dist/decorator/registeInfos.js.map
View file @
485286a9
{"version":3,"file":"registeInfos.js","sourceRoot":"","sources":["../../src/decorator/registeInfos.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,cAAc;AACd,sCAAwC;AACxC,kCAAkE;AAGlE,4CAAqD;AAIrD,SAAe,YAAY,CAAC,OAA0B,EAAE,SAA2B,EAAE,SAAkB;;;;;;;oBAC/F,OAAO,qBAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,0CAAE,SAAS,0CAAE,OAAO,0CAAE,OAAO,CAAA;oBACrD,WAAW,GAAG,IAAI,qBAAW,CAAC,OAAO,CAAC,CAAA;yBAExC,CAAA,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAA,EAArD,wBAAqD;oBACtC,qBAAM,WAAW,CAAC,WAAW,EAAE,EAAA;;oBAA1C,QAAQ,GAAG,SAA+B;oBAChD,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAA;;;yBAG3B,CAAA,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAA,EAAnD,wBAAmD;oBACvB,qBAAM,wBAAgB,CAAC,OAAO,CAAC,EAAA;;oBAAvD,KAAwB,SAA+B,EAArD,OAAO,aAAA,EAAE,QAAQ,cAAA;oBACzB,SAAS,CAAC,OAAO,GAAG,OAAO,CAAA;oBAC3B,SAAS,CAAC,gBAAgB,GAAG,QAAQ,CAAA;;;yBAGnC,CAAA,SAAS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;;wBAE7B,sBAAO,SAAS,EAAA;;;;CACjB;AAEY,QAAA,YAAY,GAAG,UAAC,SAAkB;IAC7C,OAAO,UAAU,MAAW,EAAE,IAAY,EAAE,UAA8B;QACxE,IAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAA;QAC/B,UAAU,CAAC,KAAK,GAAG;YAAgB,cAAc;iBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;gBAAd,yBAAc;;;;;;;4BACxC,OAAO,GAAoB,IAAI,GAAxB,EAAE,KAAkB,IAAI,GAAR,EAAd,SAAS,mBAAG,EAAE,KAAA,CAAQ;4BAErB,qBAAM,YAAY,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,EAAA;;4BAA5D,QAAQ,GAAG,SAAiD;4BAElE,sBAAO,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,OAAO,eAAO,QAAQ,EAAG,CAAC,EAAA;;;;SACxD,CAAA;IACH,CAAC,CAAA;AACH,CAAC,CAAA"}
\ No newline at end of file
v2.0/src/decorator/registeInfos.ts
View file @
485286a9
...
...
@@ -23,6 +23,11 @@ async function initBaseInfo(context: IContext<IParams>, baseInfos: IControllerIn
}
if
(
needInfos
.
includes
(
'vipInfo'
)
&&
!
baseInfos
.
vipInfo
&&
handler
!==
'getVipInfo'
)
{
if
(
!
baseInfos
.
session
)
{
const
{
session
,
userNick
}
=
await
getSellerSession
(
context
)
baseInfos
.
session
=
session
baseInfos
.
activityUserNick
=
userNick
}
const
vipInfo
=
await
userService
.
getShopVip
(
baseInfos
.
session
,
formatVipCbUrl
(
context
),
baseInfos
.
activityUserNick
)
baseInfos
.
vipInfo
=
vipInfo
}
...
...
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